depot/third_party/nixpkgs/pkgs/development/python-modules/fastbencode/default.nix
Default email 686ce24904 Project import generated by Copybara.
GitOrigin-RevId: ac1f5b72a9e95873d1de0233fddcb56f99884b37
2023-02-16 18:41:37 +01:00

39 lines
726 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, python
, pythonOlder
, cython
}:
buildPythonPackage rec {
pname = "fastbencode";
version = "0.2";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-V465xHANZwXXH7yNfVe8os2Yfsos7B2ed7ngcC2x5W8=";
};
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";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ marsam ];
};
}