depot/third_party/nixpkgs/pkgs/development/python-modules/fastbencode/default.nix
Default email 5c370c0b2a Project import generated by Copybara.
GitOrigin-RevId: 33d1e753c82ffc557b4a585c77de43d4c922ebb5
2024-05-15 17:35:15 +02:00

40 lines
847 B
Nix

{
lib,
buildPythonPackage,
cython,
fetchPypi,
python,
pythonOlder,
setuptools,
}:
buildPythonPackage rec {
pname = "fastbencode";
version = "0.3.1";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-X+DLfRc2iRr2HSreQM6UiUHUbpCLFvU4P1XxJ4SNoZc=";
};
build-system = [ setuptools ];
nativeBuildInputs = [ cython ];
pythonImportsCheck = [ "fastbencode" ];
checkPhase = ''
${python.interpreter} -m unittest fastbencode.tests.test_suite
'';
meta = with lib; {
description = "Fast implementation of bencode";
homepage = "https://github.com/breezy-team/fastbencode";
changelog = "https://github.com/breezy-team/fastbencode/releases/tag/v${version}";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ ];
};
}