diff options
Diffstat (limited to 'meta-python/recipes-devtools/python/python3-pandas')
3 files changed, 19 insertions, 86 deletions
diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch index e83576eb62..ed5eb767e9 100644 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch +++ b/meta-python/recipes-devtools/python/python3-pandas/0001-BLD-add-option-to-specify-numpy-header-location.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 16dd09e6c79768a24f5a50ec5985e0b6fdf17f35 Mon Sep 17 00:00:00 2001 | 1 | From 65db03f03dbb61172c6eea8b34d11ea9eb0c6d77 Mon Sep 17 00:00:00 2001 |
| 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> | 2 | From: Gyorgy Sarvari <skandigraun@gmail.com> |
| 3 | Date: Mon, 10 Mar 2025 13:52:11 +0100 | 3 | Date: Mon, 10 Mar 2025 13:52:11 +0100 |
| 4 | Subject: [PATCH] BLD: add option to specify numpy header location | 4 | Subject: [PATCH] BLD: add option to specify numpy header location |
| @@ -19,24 +19,29 @@ include folder location, fall back to the value of this meson option. | |||
| 19 | Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/61095] | 19 | Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/61095] |
| 20 | 20 | ||
| 21 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | 21 | Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> |
| 22 | Signed-off-by: Leon Anavi <leon.anavi@konsulko.com> | ||
| 22 | --- | 23 | --- |
| 23 | meson.options | 1 + | 24 | meson.options | 1 + |
| 24 | pandas/meson.build | 13 ++++++++++--- | 25 | pandas/meson.build | 12 +++++++++--- |
| 25 | 2 files changed, 11 insertions(+), 3 deletions(-) | 26 | 2 files changed, 10 insertions(+), 3 deletions(-) |
| 26 | create mode 100644 meson.options | 27 | create mode 100644 meson.options |
| 27 | 28 | ||
| 29 | diff --git a/meson.options b/meson.options | ||
| 30 | new file mode 100644 | ||
| 31 | index 0000000..3d3a18d | ||
| 28 | --- /dev/null | 32 | --- /dev/null |
| 29 | +++ b/meson.options | 33 | +++ b/meson.options |
| 30 | @@ -0,0 +1 @@ | 34 | @@ -0,0 +1 @@ |
| 31 | +option('numpy_inc_dir', type : 'string', description : 'The absolute path to the numpy headers') | 35 | +option('numpy_inc_dir', type : 'string', description : 'The absolute path to the numpy headers') |
| 36 | diff --git a/pandas/meson.build b/pandas/meson.build | ||
| 37 | index 840ac25..2c3423e 100644 | ||
| 32 | --- a/pandas/meson.build | 38 | --- a/pandas/meson.build |
| 33 | +++ b/pandas/meson.build | 39 | +++ b/pandas/meson.build |
| 34 | @@ -3,17 +3,24 @@ incdir_numpy = run_command(py, | 40 | @@ -4,17 +4,23 @@ incdir_numpy = run_command( |
| 35 | '-c', | 41 | '-c', |
| 36 | ''' | 42 | ''' |
| 37 | import os | 43 | import os |
| 38 | -import numpy as np | 44 | -import numpy as np |
| 39 | + | ||
| 40 | +try: | 45 | +try: |
| 41 | + import numpy as np | 46 | + import numpy as np |
| 42 | + base_incdir = np.get_include() | 47 | + base_incdir = np.get_include() |
| @@ -53,9 +58,12 @@ Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com> | |||
| 53 | - incdir = np.get_include() | 58 | - incdir = np.get_include() |
| 54 | + incdir = base_incdir | 59 | + incdir = base_incdir |
| 55 | print(incdir) | 60 | print(incdir) |
| 56 | ''' | 61 | ''', |
| 57 | ], | 62 | ], |
| 58 | + env: {'NUMPY_INC_DIR': get_option('numpy_inc_dir')}, | 63 | + env: {'NUMPY_INC_DIR': get_option('numpy_inc_dir')}, |
| 59 | check: true | 64 | check: true, |
| 60 | ).stdout().strip() | 65 | ).stdout().strip() |
| 61 | 66 | ||
| 67 | -- | ||
| 68 | 2.47.3 | ||
| 69 | |||
diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch deleted file mode 100644 index deadacafa9..0000000000 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-fix-reproducibility-issue.patch +++ /dev/null | |||
| @@ -1,43 +0,0 @@ | |||
| 1 | From 80274cd3a0746ddc5421643dd40d47bdf3c6a68c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 3 | Date: Fri, 26 Sep 2025 15:47:53 +0800 | ||
| 4 | Subject: [PATCH] fix reproducibility issue | ||
| 5 | |||
| 6 | The type of new_value is either `npy_timedelta' or `int64_t' | ||
| 7 | In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c | ||
| 8 | .. | ||
| 9 | npy_timedelta __pyx_v_new_value; | ||
| 10 | ... | ||
| 11 | |||
| 12 | In build/pandas/_libs/tslibs/timedeltas.cpython-313-x86_64-linux-gnu.so.p/pandas/_libs/tslibs/timedeltas.pyx.c | ||
| 13 | ... | ||
| 14 | __pyx_t_5numpy_int64_t __pyx_v_new_value; | ||
| 15 | ... | ||
| 16 | |||
| 17 | Explicitly define it as int64_t to assure the generated source is | ||
| 18 | reproducibility between builds | ||
| 19 | |||
| 20 | Upstream-Status: Submitted [https://github.com/pandas-dev/pandas/pull/62459] | ||
| 21 | |||
| 22 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
| 23 | --- | ||
| 24 | pandas/_libs/tslibs/timedeltas.pyx | 3 +++ | ||
| 25 | 1 file changed, 3 insertions(+) | ||
| 26 | |||
| 27 | diff --git a/pandas/_libs/tslibs/timedeltas.pyx b/pandas/_libs/tslibs/timedeltas.pyx | ||
| 28 | index f6c69cf..34ac9e7 100644 | ||
| 29 | --- a/pandas/_libs/tslibs/timedeltas.pyx | ||
| 30 | +++ b/pandas/_libs/tslibs/timedeltas.pyx | ||
| 31 | @@ -1820,6 +1820,9 @@ class Timedelta(_Timedelta): | ||
| 32 | |||
| 33 | disallow_ambiguous_unit(unit) | ||
| 34 | |||
| 35 | + cdef: | ||
| 36 | + int64_t new_value; | ||
| 37 | + | ||
| 38 | # GH 30543 if pd.Timedelta already passed, return it | ||
| 39 | # check that only value is passed | ||
| 40 | if isinstance(value, _Timedelta): | ||
| 41 | -- | ||
| 42 | 2.34.1 | ||
| 43 | |||
diff --git a/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch b/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch deleted file mode 100644 index 950f25303f..0000000000 --- a/meta-python/recipes-devtools/python/python3-pandas/0001-pyproject.toml-don-t-pin-dependency-versions.patch +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | From d46b8720a6bccb345f6bdd7ee2f5c357e7eb227b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Trevor Gamblin <tgamblin@baylibre.com> | ||
| 3 | Date: Mon, 12 Aug 2024 11:27:36 -0400 | ||
| 4 | Subject: [PATCH] pyproject.toml: don't pin dependency versions | ||
| 5 | |||
| 6 | Pandas will fail to build if the exact versions aren't found, but newer | ||
| 7 | ones actually work. Since newer versions of pandas are adjusting the | ||
| 8 | requires section of pyproject toml further, just patch it for us. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate [OE-Specific] | ||
| 11 | |||
| 12 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
| 13 | --- | ||
| 14 | pyproject.toml | 6 +++--- | ||
| 15 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
| 16 | |||
| 17 | --- a/pyproject.toml | ||
| 18 | +++ b/pyproject.toml | ||
| 19 | @@ -2,10 +2,10 @@ | ||
| 20 | # Minimum requirements for the build system to execute. | ||
| 21 | # See https://github.com/scipy/scipy/pull/12940 for the AIX issue. | ||
| 22 | requires = [ | ||
| 23 | - "meson-python==0.13.1", | ||
| 24 | - "meson==1.2.1", | ||
| 25 | + "meson-python>=0.13.1", | ||
| 26 | + "meson>=1.2.1", | ||
| 27 | "wheel", | ||
| 28 | - "Cython~=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json | ||
| 29 | + "Cython>=3.0.5", # Note: sync with setup.py, environment.yml and asv.conf.json | ||
| 30 | # Force numpy higher than 2.0, so that built wheels are compatible | ||
| 31 | # with both numpy 1 and 2 | ||
| 32 | "numpy>=2.0", | ||
