diff options
author | kenshin <14914796+AkechiShiro@users.noreply.github.com> | 2024-05-25 21:07:08 +0200 |
---|---|---|
committer | Sandro Jäckel <sandro.jaeckel@gmail.com> | 2024-06-20 14:10:24 +0200 |
commit | 10e9deb7982f659c05bb0304ec09ee862e6395b1 (patch) | |
tree | 92b00abacdeeace18c9f33873db23e6dbba8b0a3 | |
parent | 92fd43bd759a6f5a504bf5e90e6fd5e9dbde25ed (diff) | |
download | nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar.gz nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar.bz2 nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar.lz nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar.xz nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.tar.zst nixlib-10e9deb7982f659c05bb0304ec09ee862e6395b1.zip |
python39Packages.bsddb3: disable on Python 3.10+, remove distutils usage
-rw-r--r-- | pkgs/development/python-modules/bsddb3/default.nix | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/development/python-modules/bsddb3/default.nix b/pkgs/development/python-modules/bsddb3/default.nix index fbf29c4f7eac..af25971df03b 100644 --- a/pkgs/development/python-modules/bsddb3/default.nix +++ b/pkgs/development/python-modules/bsddb3/default.nix @@ -1,11 +1,11 @@ { lib, buildPythonPackage, + pythonAtLeast, + python, fetchPypi, setuptools, pkgs, - python, - pythonOlder, }: buildPythonPackage rec { @@ -22,11 +22,9 @@ buildPythonPackage rec { buildInputs = [ pkgs.db ]; - doCheck = pythonOlder "3.12"; # distutils usage - - 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. @@ -36,6 +34,16 @@ 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"; |