2022-10-21 18:38:19 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, cython
|
|
|
|
}:
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "fastbencode";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "0.0.15";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-A1XfgjNV9k4iA3HYf0HlA1CvpwzFh52OaN7f6YLgU+I=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cython
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"fastbencode"
|
|
|
|
];
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${python.interpreter} -m unittest fastbencode.tests.test_suite
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Fast implementation of bencode";
|
|
|
|
homepage = "https://github.com/breezy-team/fastbencode";
|
2022-07-14 12:49:19 +00:00
|
|
|
license = licenses.gpl2Plus;
|
2022-10-21 18:38:19 +00:00
|
|
|
maintainers = with maintainers; [ marsam ];
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
}
|