mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-22 04:45:39 +00:00
python312Packages.pandas: use cython 3
This is a hack to allow pandas 2.1.3 to build on python 3.12, which is only supported from 2.2.0 Cython 2 still calls into distutils, Cython 3 does not.
This commit is contained in:
parent
8037c388b0
commit
57c8d87e96
@ -2,10 +2,12 @@
|
||||
, stdenv
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonAtLeast
|
||||
, pythonOlder
|
||||
|
||||
# build-system
|
||||
, cython
|
||||
, cython_3
|
||||
, meson-python
|
||||
, meson
|
||||
, oldest-supported-numpy
|
||||
@ -77,12 +79,14 @@ let pandas = buildPythonPackage rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "Cython>=0.29.33,<3" "Cython" \
|
||||
--replace "meson-python==0.13.1" "meson-python>=0.13.1" \
|
||||
--replace "meson==1.2.1" "meson>=1.2.1"
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
# TODO: hack to support pandas on python3.12, remove with pandas 2.2.0
|
||||
(if pythonAtLeast "3.12" then cython_3 else cython)
|
||||
meson-python
|
||||
meson
|
||||
numpy
|
||||
|
Loading…
Reference in New Issue
Block a user