about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/apipkg/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/apipkg/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/apipkg/default.nix12
1 files changed, 9 insertions, 3 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/apipkg/default.nix b/nixpkgs/pkgs/development/python-modules/apipkg/default.nix
index bd535a972d15..a2a026e74d5b 100644
--- a/nixpkgs/pkgs/development/python-modules/apipkg/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/apipkg/default.nix
@@ -1,5 +1,5 @@
 { stdenv, buildPythonPackage, fetchPypi
-, pytest_3, setuptools_scm }:
+, pytest, setuptools_scm }:
 
 buildPythonPackage rec {
   pname = "apipkg";
@@ -11,7 +11,13 @@ buildPythonPackage rec {
   };
 
   nativeBuildInputs = [ setuptools_scm ];
-  checkInputs = [ pytest_3 ];
+  checkInputs = [ pytest ];
+
+  # Fix pytest 4 support. See: https://github.com/pytest-dev/apipkg/issues/14
+  postPatch = ''
+    substituteInPlace "test_apipkg.py" \
+      --replace "py.test.ensuretemp('test_apipkg')" "py.path.local('test_apipkg')"
+  '';
 
   checkPhase = ''
     py.test
@@ -19,7 +25,7 @@ buildPythonPackage rec {
 
   meta = with stdenv.lib; {
     description = "Namespace control and lazy-import mechanism";
-    homepage = https://bitbucket.org/hpk42/apipkg;
+    homepage = "https://github.com/pytest-dev/apipkg";
     license = licenses.mit;
   };
 }