Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions ports/py-rasterio/no-gdal-config-autodetect.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
--- a/setup.py
+++ b/setup.py
@@ -233,24 +233,6 @@
log.info("GDAL API version obtained from gdal-config: %s", gdalversion)

if "clean" not in sys.argv:
- try:
- fill_gdal_build_options_using_gdal_config()
- except Exception as e:
- # Try to run gdalinfo and get information from that instead
- log.info(
- "Failed to use gdal-config, trying to run gdalinfo instead (gdal-config error of type %s: %s)",
- type(e).__name__,
- e,
- )
- try:
- fill_gdal_build_options_using_executable(executable_name="gdalinfo")
- except Exception as e:
- log.warning(
- "Failed to get options via both gdal-config and gdalinfo. (gdalinfo error of type %s: %s)",
- type(e).__name__,
- e,
- )
-
# Get GDAL API version from environment variable.
if 'GDAL_VERSION' in os.environ:
gdalversion = os.environ['GDAL_VERSION']
4 changes: 4 additions & 0 deletions ports/py-rasterio/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ library_dirs=${CURRENT_INSTALLED_DIR}/lib
libraries=gdal
")

vcpkg_apply_patches(SOURCE_PATH "${SOURCE_PATH}"
PATCHES no-gdal-config-autodetect.patch
)

vcpkg_python_build_and_install_wheel(SOURCE_PATH "${SOURCE_PATH}")

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
Expand Down
Loading