about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyarrow/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/pyarrow/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix b/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
index 053b280c500e..7c19bdefd4f6 100644
--- a/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/pyarrow/default.nix
@@ -37,6 +37,10 @@ buildPythonPackage rec {
   postPatch = ''
     substituteInPlace pyproject.toml setup.py \
       --replace "setuptools_scm < 8.0.0" "setuptools_scm"
+  '' + lib.optionalString (pythonAtLeast "3.12") ''
+    substituteInPlace ./cmake_modules/FindPython3Alt.cmake --replace-fail \
+      "from distutils import sysconfig" \
+      "import sysconfig"
   '';
 
   nativeBuildInputs = [