diff options
Diffstat (limited to 'pkgs/development/python-modules/pyserial/default.nix')
-rw-r--r-- | pkgs/development/python-modules/pyserial/default.nix | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/pyserial/default.nix b/pkgs/development/python-modules/pyserial/default.nix index b45b031fb84a4..e6b8edb784aae 100644 --- a/pkgs/development/python-modules/pyserial/default.nix +++ b/pkgs/development/python-modules/pyserial/default.nix @@ -1,12 +1,23 @@ -{ stdenv, lib, fetchPypi, buildPythonPackage }: +{ lib +, stdenv +, buildPythonPackage +, fetchPypi +, python +, pythonOlder +, isPy3k +}: buildPythonPackage rec { pname = "pyserial"; - version="3.5"; + version = "3.5"; + format = "setuptools"; + + # Supports Python 2.7 and 3.4+ + disabled = isPy3k && pythonOlder "3.4"; src = fetchPypi { inherit pname version; - sha256 = "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"; + hash = "sha256-PHfgFBcN//vYFub/wgXphC77EL6fWOwW0+hnW0klzds="; }; patches = [ @@ -14,13 +25,22 @@ buildPythonPackage rec { ./002-rfc2217-timeout-setter-for-rfc2217.patch ]; - checkPhase = "python -m unittest discover -s test"; doCheck = !stdenv.hostPlatform.isDarwin; # broken on darwin + checkPhase = '' + runHook preCheck + ${python.interpreter} -m unittest discover -s test + runHook postCheck + ''; + + pythonImportsCheck = [ + "serial" + ]; + meta = with lib; { - homepage = "https://github.com/pyserial/pyserial"; - license = licenses.psfl; description = "Python serial port extension"; + homepage = "https://github.com/pyserial/pyserial"; + license = licenses.bsd3; maintainers = with maintainers; [ makefu ]; }; } |