summary refs log tree commit diff
path: root/pkgs/development/python-modules/construct
diff options
context:
space:
mode:
authorJosef Kemetmüller <josef.kemetmueller@gmail.com>2018-03-10 23:36:00 +0100
committerJosef Kemetmüller <josef.kemetmueller@gmail.com>2018-03-10 23:36:00 +0100
commit91a9453496767ef60baa6d22574136dc86ad3322 (patch)
treef472975218c10a8de9b43a3c33529f04b861ecc2 /pkgs/development/python-modules/construct
parent5c2523272864e498f42485ce13231c7c266c7f0d (diff)
downloadnixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar.gz
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar.bz2
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar.lz
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar.xz
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.tar.zst
nixlib-91a9453496767ef60baa6d22574136dc86ad3322.zip
pythonPackages.construct: Fix darwin build
The package runs fine on darwin. Using pytest as a test runner also
resolves the checkPhase issue on Python 3.5+.
Diffstat (limited to 'pkgs/development/python-modules/construct')
-rw-r--r--pkgs/development/python-modules/construct/default.nix11
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgs/development/python-modules/construct/default.nix b/pkgs/development/python-modules/construct/default.nix
index 78aa0aab5c08..afba2e17bf64 100644
--- a/pkgs/development/python-modules/construct/default.nix
+++ b/pkgs/development/python-modules/construct/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, buildPythonPackage, fetchFromGitHub, six, pythonOlder }:
+{ stdenv, buildPythonPackage, fetchFromGitHub, six, pytest, pythonOlder }:
 
 buildPythonPackage rec {
   pname = "construct";
@@ -14,15 +14,16 @@ buildPythonPackage rec {
 
   propagatedBuildInputs = [ six ];
 
-  # Tests fail with the following error on Python 3.5+
-  # TypeError: not all arguments converted during string formatting
-  doCheck = pythonOlder "3.5";
+  checkInputs = [ pytest ];
+
+  checkPhase = ''
+    py.test -k 'not test_numpy' tests
+  '';
 
   meta = with stdenv.lib; {
     description = "Powerful declarative parser (and builder) for binary data";
     homepage = http://construct.readthedocs.org/;
     license = licenses.mit;
-    platforms = platforms.linux;
     maintainers = with maintainers; [ bjornfor ];
   };
 }