From 44e023f9654bce3301a2ba27efdf476a1b05aa98 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 6 Aug 2025 03:35:46 +0200 Subject: [PATCH] python3Packages.psycopg: relax deps and clean up --- .../python-modules/psycopg/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/psycopg/default.nix b/pkgs/development/python-modules/psycopg/default.nix index d1812889b663..d50a40738b06 100644 --- a/pkgs/development/python-modules/psycopg/default.nix +++ b/pkgs/development/python-modules/psycopg/default.nix @@ -4,7 +4,6 @@ buildPythonPackage, fetchFromGitHub, fetchurl, - pythonOlder, replaceVars, # build @@ -69,6 +68,9 @@ let # move into source root after patching postPatch = '' cd psycopg_c + + substituteInPlace pyproject.toml \ + --replace-fail "Cython >= 3.0.0, < 3.1.0" "Cython" ''; nativeBuildInputs = [ @@ -116,9 +118,7 @@ in buildPythonPackage rec { inherit pname version src; - format = "pyproject"; - - disabled = pythonOlder "3.7"; + pyproject = true; outputs = [ "out" @@ -143,15 +143,15 @@ buildPythonPackage rec { ''; nativeBuildInputs = [ - furo setuptools - shapely ] # building the docs fails with the following error when cross compiling # AttributeError: module 'psycopg_c.pq' has no attribute '__impl__' ++ lib.optionals (stdenv.hostPlatform == stdenv.buildPlatform) [ + furo sphinx-autodoc-typehints sphinxHook + shapely ]; propagatedBuildInputs = [ @@ -209,9 +209,6 @@ buildPythonPackage rec { # Mypy typing test "tests/test_typing.py" "tests/crdb/test_typing.py" - # https://github.com/psycopg/psycopg/pull/915 - "tests/test_notify.py" - "tests/test_notify_async.py" ]; pytestFlags = [