forked from OSGeo/gdal
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci/travis/conda: fix Python bindings build
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
ci/travis/conda/0001-Fix-build-of-Python-bindings-due-to-https-github.com.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From c8e8942b5dd50d1abb4369662b0cb9d282c3bf69 Mon Sep 17 00:00:00 2001 | ||
From: Even Rouault <[email protected]> | ||
Date: Wed, 6 Dec 2023 19:06:08 +0100 | ||
Subject: [PATCH] Fix build of Python bindings due to | ||
https://github.com/OSGeo/gdal/pull/8926 changes | ||
|
||
--- | ||
recipe/install_python.sh | 14 ++++++++------ | ||
1 file changed, 8 insertions(+), 6 deletions(-) | ||
|
||
diff --git a/recipe/install_python.sh b/recipe/install_python.sh | ||
index 4bcd219..1561771 100644 | ||
--- a/recipe/install_python.sh | ||
+++ b/recipe/install_python.sh | ||
@@ -21,12 +21,14 @@ cmake "-UPython*" \ | ||
cmake --build . --target python_generated_files | ||
cd swig/python | ||
|
||
-cat >pyproject.toml <<EOF | ||
-[build-system] | ||
-requires = ["setuptools>=40.8.0", "wheel"] | ||
-build-backend = "setuptools.build_meta" | ||
-EOF | ||
- | ||
$PYTHON setup.py build_ext | ||
|
||
+# Cf https://github.com/OSGeo/gdal/pull/8926 | ||
+# The above build_ext has been run with numpy already installed in the environment | ||
+# because otherwise it would have failed. | ||
+# But as we run pip install without dependencies, we have to force | ||
+# GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=YES to disable the related check. | ||
+# This is OK here since the bindings have already been built, and it is just | ||
+# a matter of bundling them in the wheel. | ||
+export GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=YES | ||
$PYTHON -m pip install --no-deps --ignore-installed . | ||
-- | ||
2.25.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters