diff --git a/pkgs/development/python-modules/pysendfile/default.nix b/pkgs/development/python-modules/pysendfile/default.nix index af3c07cb851c..d59a99926435 100644 --- a/pkgs/development/python-modules/pysendfile/default.nix +++ b/pkgs/development/python-modules/pysendfile/default.nix @@ -1,31 +1,40 @@ -{ stdenv -, lib +{ lib +, stdenv , buildPythonPackage , fetchPypi -, python +, pythonOlder +, setuptools }: buildPythonPackage rec { pname = "pysendfile"; version = "2.0.1"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "05qf0m32isflln1zjgxlpw0wf469lj86vdwwqyizp1h94x5l22ji"; + hash = "sha256-UQpBSycJhvujx5y3bZCkyRDHAb+0P/mDpdTpKEYFDhc="; }; - checkPhase = '' - # this test takes too long - sed -i 's/test_big_file/noop/' test/test_sendfile.py - ${python.executable} test/test_sendfile.py - ''; + build-system = [ + setuptools + ]; + + # Tests depend on asynchat and asyncore + doCheck = false; + + pythonImportsCheck = [ + "sendfile" + ]; meta = with lib; { - broken = stdenv.isDarwin; - homepage = "https://github.com/giampaolo/pysendfile"; description = "A Python interface to sendfile(2)"; + homepage = "https://github.com/giampaolo/pysendfile"; + changelog = "https://github.com/giampaolo/pysendfile/blob/release-${version}/HISTORY.rst"; license = licenses.mit; + maintainers = with maintainers; [ ]; + broken = stdenv.isDarwin; }; - }