From 80503e20b16dfe3a08caf9a2a83dee1ccc982df1 Mon Sep 17 00:00:00 2001 From: Stuart Prescott Date: Thu, 9 Jan 2025 15:46:50 +1100 Subject: [PATCH] Refresh patches --- .../0005-Fix-numpy-header-detection.patch | 17 +++++++++++------ ...0-Add-Python-3.13-as-supported-version.patch | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/debian/patches/0005-Fix-numpy-header-detection.patch b/debian/patches/0005-Fix-numpy-header-detection.patch index fdfbecab..56b4a721 100644 --- a/debian/patches/0005-Fix-numpy-header-detection.patch +++ b/debian/patches/0005-Fix-numpy-header-detection.patch @@ -1,18 +1,18 @@ From: Stuart Prescott -Date: Tue, 7 May 2024 10:06:59 +1000 +Date: Thu, 9 Jan 2025 15:45:36 +1100 Subject: Fix numpy header detection Existing code makes assumptions about site-packages/dist-packages and fails to find the headers; numpy has an explicit function for this --- - build_scripts/utils.py | 8 ++------ - 1 file changed, 2 insertions(+), 6 deletions(-) + build_scripts/utils.py | 13 ++----------- + 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/build_scripts/utils.py b/build_scripts/utils.py -index 74d9e6f..8121c8d 100644 +index 311c67f..8121c8d 100644 --- a/build_scripts/utils.py +++ b/build_scripts/utils.py -@@ -67,12 +67,8 @@ def update_env_path(newpaths): +@@ -67,17 +67,8 @@ def update_env_path(newpaths): def get_numpy_location(): @@ -20,7 +20,12 @@ index 74d9e6f..8121c8d 100644 - if 'site-' in p: - numpy = Path(p).resolve() / 'numpy' - if numpy.is_dir(): -- return os.fspath(numpy / 'core' / 'include') +- candidate = numpy / '_core' / 'include' # Version 2 +- if not candidate.is_dir(): +- candidate = numpy / 'core' / 'include' # Version 1 +- if candidate.is_dir(): +- return os.fspath(candidate) +- log.warning(f"Cannot find numpy include dir under {numpy}") - return None + import numpy + return numpy.get_include() diff --git a/debian/patches/0010-Add-Python-3.13-as-supported-version.patch b/debian/patches/0010-Add-Python-3.13-as-supported-version.patch index 388f665a..6ba1f77c 100644 --- a/debian/patches/0010-Add-Python-3.13-as-supported-version.patch +++ b/debian/patches/0010-Add-Python-3.13-as-supported-version.patch @@ -8,7 +8,7 @@ Subject: Add Python 3.13 as supported version 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build_scripts/config.py b/build_scripts/config.py -index 0a6eebf..d049a24 100644 +index 5a2f665..e7f4ae4 100644 --- a/build_scripts/config.py +++ b/build_scripts/config.py @@ -65,6 +65,7 @@ class Config(object): -- 2.30.2