diff options
author | Frederik Rietdijk <fridh@fridh.nl> | 2017-03-29 08:33:32 +0200 |
---|---|---|
committer | Frederik Rietdijk <fridh@fridh.nl> | 2017-03-29 08:33:53 +0200 |
commit | 078412521e4fbbec261b3a1a0a8296bfad0a47c3 (patch) | |
tree | 5cdcac949ed4333ab573b52f6e37df4eb205687a /pkgs | |
parent | b4716ea7a2bd666b0c432aca43a2646fcf547b0c (diff) | |
download | nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar.gz nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar.bz2 nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar.lz nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar.xz nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.tar.zst nixpkgs-078412521e4fbbec261b3a1a0a8296bfad0a47c3.zip |
pythonPackages.pyudev: fix package
- the function loading the udev library was moved to another file - the test runner did not work correctly, causing it to fail on Python 3. - the test runner now works correctly, but there's a bunch of tests failing and therefore tests are disabled. The package does seem to function (as in, it can load the library again).
Diffstat (limited to 'pkgs')
-rw-r--r-- | pkgs/development/python-modules/pyudev.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/pyudev.nix b/pkgs/development/python-modules/pyudev.nix index 98607501e03..e9a3ecaac5b 100644 --- a/pkgs/development/python-modules/pyudev.nix +++ b/pkgs/development/python-modules/pyudev.nix @@ -1,5 +1,5 @@ { lib, fetchurl, buildPythonPackage -, six, systemd +, six, systemd, pytest, mock, hypothesis, docutils }: buildPythonPackage rec { @@ -12,12 +12,21 @@ buildPythonPackage rec { }; postPatch = '' - substituteInPlace src/pyudev/_ctypeslib/libudev.py \ - --replace "find_library('udev')" "'${systemd.lib}/lib/libudev.so'" + substituteInPlace src/pyudev/_ctypeslib/utils.py \ + --replace "find_library(name)" "'${systemd.lib}/lib/libudev.so'" ''; + buildInputs = [ pytest mock hypothesis docutils ]; propagatedBuildInputs = [ systemd six ]; + checkPhase = '' + py.test + ''; + + # Bunch of failing tests + # https://github.com/pyudev/pyudev/issues/187 + doCheck = false; + meta = { homepage = "http://pyudev.readthedocs.org/"; description = "Pure Python libudev binding"; |