diff --git a/pkgs/development/python-modules/testing-postgresql/default.nix b/pkgs/development/python-modules/testing-postgresql/default.nix index c2b85fe8f9d7..1b16def31580 100644 --- a/pkgs/development/python-modules/testing-postgresql/default.nix +++ b/pkgs/development/python-modules/testing-postgresql/default.nix @@ -2,6 +2,7 @@ lib, buildPythonPackage, fetchFromGitHub, + setuptools, pg8000, postgresql, psycopg2, @@ -15,7 +16,7 @@ buildPythonPackage rec { pname = "testing-postgresql"; # Version 1.3.0 isn't working so let's use the latest commit from GitHub version = "unstable-2017-10-31"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -26,7 +27,9 @@ buildPythonPackage rec { hash = "sha256-A4tahAaa98X66ZYa3QxIQDZkwAwVB6ZDRObEhkbUWKs="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ testing-common-database pg8000 ]; @@ -40,12 +43,14 @@ buildPythonPackage rec { # Add PostgreSQL to search path prePatch = '' substituteInPlace src/testing/postgresql.py \ - --replace "/usr/local/pgsql" "${postgresql}" + --replace-fail "/usr/local/pgsql" "${postgresql}" ''; + pythonRelaxDeps = [ "pg8000" ]; + postPatch = '' substituteInPlace setup.py \ - --replace "pg8000 >= 1.10" "pg8000" + --replace-fail "pg8000 >= 1.10" "pg8000" substituteInPlace tests/test_postgresql.py \ --replace-fail "self.assertRegexpMatches" "self.assertRegex" '';