diff options
Diffstat (limited to 'pkgs/development/python-modules/bsddb3/default.nix')
-rw-r--r-- | pkgs/development/python-modules/bsddb3/default.nix | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/pkgs/development/python-modules/bsddb3/default.nix b/pkgs/development/python-modules/bsddb3/default.nix index 4edc9e1524b43..af25971df03b8 100644 --- a/pkgs/development/python-modules/bsddb3/default.nix +++ b/pkgs/development/python-modules/bsddb3/default.nix @@ -1,25 +1,30 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pkgs -, python +{ + lib, + buildPythonPackage, + pythonAtLeast, + python, + fetchPypi, + setuptools, + pkgs, }: buildPythonPackage rec { pname = "bsddb3"; version = "6.2.9"; - format = "setuptools"; + pyproject = true; src = fetchPypi { inherit pname version; sha256 = "70d05ec8dc568f42e70fc919a442e0daadc2a905a1cfb7ca77f549d49d6e7801"; }; + build-system = [ setuptools ]; + buildInputs = [ pkgs.db ]; - checkPhase = '' - ${python.interpreter} test.py - ''; + # See : https://github.com/NixOS/nixpkgs/pull/311198#discussion_r1599257522 + # More details here : https://www.jcea.es/programacion/pybsddb.htm + disabled = pythonAtLeast "3.10"; # Path to database need to be set. # Somehow the setup.py flag is not propagated. @@ -29,11 +34,20 @@ buildPythonPackage rec { export BERKELEYDB_DIR=${pkgs.db.dev}; ''; + postPatch = '' + substituteInPlace test3.py \ + --replace-fail "from distutils.util import get_platform" "from sysconfig import get_platform" \ + --replace-fail "sys.config[0:3]" "sys.implementation.cache_tag" + ''; + + checkPhase = '' + ${python.interpreter} test.py + ''; + meta = with lib; { description = "Python bindings for Oracle Berkeley DB"; homepage = "https://www.jcea.es/programacion/pybsddb.htm"; license = with licenses; [ agpl3Only ]; # License changed from bsd3 to agpl3 since 6.x maintainers = [ ]; }; - } |