summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-26 23:42:14 +0100
committerRobert Schütz <robert.schuetz@stud.uni-heidelberg.de>2018-02-26 23:42:14 +0100
commitf760fcb239641870101b057bc40827afe16464f3 (patch)
treeb86ba0035bf5f99cd6255b0ba56912e03306da67
parenta367095153c446223c64e8ffea6a95b0c91402c0 (diff)
downloadnixlib-f760fcb239641870101b057bc40827afe16464f3.tar
nixlib-f760fcb239641870101b057bc40827afe16464f3.tar.gz
nixlib-f760fcb239641870101b057bc40827afe16464f3.tar.bz2
nixlib-f760fcb239641870101b057bc40827afe16464f3.tar.lz
nixlib-f760fcb239641870101b057bc40827afe16464f3.tar.xz
nixlib-f760fcb239641870101b057bc40827afe16464f3.tar.zst
nixlib-f760fcb239641870101b057bc40827afe16464f3.zip
pythonPackages.cached-property: fix tests
Need to fetch from GitHub because conftest.py is necessary to disable some tests for Python 2.
-rw-r--r--pkgs/development/python-modules/cached-property/default.nix21
1 files changed, 15 insertions, 6 deletions
diff --git a/pkgs/development/python-modules/cached-property/default.nix b/pkgs/development/python-modules/cached-property/default.nix
index 1cd8e36594ba..5daa505429ed 100644
--- a/pkgs/development/python-modules/cached-property/default.nix
+++ b/pkgs/development/python-modules/cached-property/default.nix
@@ -1,6 +1,7 @@
 { lib
 , buildPythonPackage
-, fetchPypi
+, fetchFromGitHub
+, pytest
 , freezegun
 }:
 
@@ -8,12 +9,20 @@ buildPythonPackage rec {
   pname = "cached-property";
   version = "1.4.0";
 
-  src = fetchPypi {
-    inherit pname version;
-    sha256 = "a2fa0f89dd422f7e5dd992a4a3e0ce209d5d1e47a4db28fd0a7b5273ec8da3f0";
+  # conftest.py is missing in PyPI tarball
+  # https://github.com/pydanny/cached-property/pull/87
+  src = fetchFromGitHub {
+    owner = "pydanny";
+    repo = pname;
+    rev = version;
+    sha256 = "0w7709grs4yqhfbnn7lva2fgyphvh43xcfqhi95lhh8sjad3xwkw";
   };
 
-  checkInputs = [ freezegun ];
+  checkInputs = [ pytest freezegun ];
+
+  checkPhase = ''
+    py.test
+  '';
 
   meta = {
     description = "A decorator for caching properties in classes";
@@ -22,4 +31,4 @@ buildPythonPackage rec {
     platforms = lib.platforms.unix;
     maintainers = with lib.maintainers; [ ericsagnes ];
   };
-}
\ No newline at end of file
+}