From e55e51065f5b080a86a12f5a994bb1ce40163467 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Mon, 4 May 2020 16:50:47 -0600 Subject: [PATCH 01/13] Build 1.1.4-dev --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d79289..7c6dafb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ cache: env: global: - REPO_DIR=rasterio - - BUILD_COMMIT=1.1.3 + - BUILD_COMMIT=a1a803d - PLAT=x86_64 - UNICODE_WIDTH=32 - USE_CCACHE=1 From 11360b5fbb61c795e8a4c30af329503d360712ba Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Mon, 4 May 2020 18:04:33 -0600 Subject: [PATCH 02/13] wheel 0.34.2 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7c6dafb..84f4043 100644 --- a/.travis.yml +++ b/.travis.yml @@ -95,8 +95,8 @@ jobs: before_install: - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" - - BUILD_DEPENDS="$NP_BUILD_DEP cython==0.29.14 wheel==0.31.1" - - TEST_DEPENDS="$NP_TEST_DEP attrs==19.1.0 pytest==4.0.2 click==7.0.0 mock boto3 packaging hypothesis==4.38.1 wheel==0.31.1 $GEN_DEPS" + - BUILD_DEPENDS="$NP_BUILD_DEP cython==0.29.14 wheel==0.34.2" + - TEST_DEPENDS="$NP_TEST_DEP attrs==19.1.0 pytest==4.0.2 click==7.0.0 mock boto3 packaging hypothesis==4.38.1 wheel==0.34.2 $GEN_DEPS" - source multibuild/common_utils.sh - source multibuild/travis_steps.sh - before_install From 495ef9c383423ba66552880c991cf208f0b1faee Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Mon, 4 May 2020 18:13:40 -0600 Subject: [PATCH 03/13] Build maint-1.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 84f4043..f4439e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,7 @@ cache: env: global: - REPO_DIR=rasterio - - BUILD_COMMIT=a1a803d + - BUILD_COMMIT=c6c1bf8 - PLAT=x86_64 - UNICODE_WIDTH=32 - USE_CCACHE=1 From 385c1cbe52831c1f5e0cfdd54108241068e26004 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 13:45:50 -0600 Subject: [PATCH 04/13] Patch GDAL, twice Use a patched auditwheel to add an extra library name tag to copied libs. Resolves #39, #41, #43, #44 --- .travis.yml | 7 +- config.sh | 2 + env_vars.sh | 5 +- ...7d70990182aef316ac76f0c7c8fb3647259b2.diff | 28 +++ patches/2310.diff | 185 ++++++++++++++++++ 5 files changed, 223 insertions(+), 4 deletions(-) create mode 100644 patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff create mode 100644 patches/2310.diff diff --git a/.travis.yml b/.travis.yml index f4439e9..cd25919 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,30 +31,35 @@ jobs: env: - MB_PYTHON_VERSION=2.7 - NP_BUILD_DEP=numpy==1.10.4 + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" - NP_TEST_DEP=numpy==1.11.3 - name: "Python 3.5 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.5 - NP_BUILD_DEP=numpy==1.14.5 + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.6 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.6 - NP_BUILD_DEP=numpy==1.14.5 + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.7 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.7 - NP_BUILD_DEP=numpy==1.14.5 + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.8 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.8 - NP_BUILD_DEP=numpy==1.17.3 + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" - NP_TEST_DEP=numpy==1.17.3 - name: "Python 2.7 osx" os: osx @@ -95,7 +100,7 @@ jobs: before_install: - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" - - BUILD_DEPENDS="$NP_BUILD_DEP cython==0.29.14 wheel==0.34.2" + - BUILD_DEPENDS="$NP_BUILD_DEP $AW_BUILD_DEP cython==0.29.14 wheel==0.34.2" - TEST_DEPENDS="$NP_TEST_DEP attrs==19.1.0 pytest==4.0.2 click==7.0.0 mock boto3 packaging hypothesis==4.38.1 wheel==0.34.2 $GEN_DEPS" - source multibuild/common_utils.sh - source multibuild/travis_steps.sh diff --git a/config.sh b/config.sh index 684b222..560add9 100644 --- a/config.sh +++ b/config.sh @@ -172,6 +172,8 @@ function build_gdal { fetch_unpack http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz (cd gdal-${GDAL_VERSION} \ + && patch -u -p1 < ../patches/bd6cf7d527ec88fdd6cc3f078387683d683d0445.diff \ + && patch -u -p1 < ../patches/2310.diff \ && ./configure \ --with-crypto=yes \ --with-hide-internal-symbols \ diff --git a/env_vars.sh b/env_vars.sh index c15895d..d536cfa 100644 --- a/env_vars.sh +++ b/env_vars.sh @@ -9,15 +9,14 @@ PROJ_VERSION=4.9.3 PROJ_DATUMGRID_VERSION=1.8 SQLITE_VERSION=3240000 GDAL_VERSION=2.4.4 -OPENSSL_ROOT=openssl-1.0.2o -OPENSSL_HASH=ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d -OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source CURL_VERSION=7.54.0 NGHTTP2_VERSION=1.35.1 EXPAT_VERSION=2.2.6 +NETCDF_VERSION=4.7.4 export MACOSX_DEPLOYMENT_TARGET=10.9 export GDAL_CONFIG=/usr/local/bin/gdal-config export PACKAGE_DATA=1 export PROJ_LIB=/usr/local/share/proj export PIP_NO_BUILD_ISOLATION=0 export PIP_USE_PEP517=0 +export AUDITWHEEL_EXTRA_LIB_NAME_TAG=rasterio diff --git a/patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff b/patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff new file mode 100644 index 0000000..0faf7ba --- /dev/null +++ b/patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff @@ -0,0 +1,28 @@ +diff --git a/gdal/frmts/hdf5/gh5_convenience.cpp b/gdal/frmts/hdf5/gh5_convenience.cpp +index 2569f862060..3be3263be44 100644 +--- a/gdal/frmts/hdf5/gh5_convenience.cpp ++++ b/gdal/frmts/hdf5/gh5_convenience.cpp +@@ -38,6 +38,11 @@ bool GH5_FetchAttribute( hid_t loc_id, const char *pszAttrName, + CPLString &osResult, bool bReportError ) + + { ++ if( !bReportError && H5Aexists(loc_id, pszAttrName) <= 0 ) ++ { ++ return false; ++ } ++ + hid_t hAttr = H5Aopen_name(loc_id, pszAttrName); + + osResult.clear(); +@@ -91,6 +96,11 @@ bool GH5_FetchAttribute( hid_t loc_id, const char *pszAttrName, + double &dfResult, bool bReportError ) + + { ++ if( !bReportError && H5Aexists(loc_id, pszAttrName) <= 0 ) ++ { ++ return false; ++ } ++ + const hid_t hAttr = H5Aopen_name(loc_id, pszAttrName); + + dfResult = 0.0; diff --git a/patches/2310.diff b/patches/2310.diff new file mode 100644 index 0000000..c24def8 --- /dev/null +++ b/patches/2310.diff @@ -0,0 +1,185 @@ +diff --git a/gdal/port/cpl_conv.cpp b/gdal/port/cpl_conv.cpp +index 290d561297d..9c047793629 100644 +--- a/gdal/port/cpl_conv.cpp ++++ b/gdal/port/cpl_conv.cpp +@@ -78,6 +78,7 @@ + #include "cpl_multiproc.h" + #include "cpl_string.h" + #include "cpl_vsi.h" ++#include "cpl_vsil_curl_priv.h" + + #ifdef DEBUG + #define OGRAPISPY_ENABLED +@@ -1798,6 +1799,18 @@ CPLGetThreadLocalConfigOption( const char *pszKey, const char *pszDefault ) + return pszResult; + } + ++/************************************************************************/ ++/* NotifyOtherComponentsConfigOptionChanged() */ ++/************************************************************************/ ++ ++static void NotifyOtherComponentsConfigOptionChanged( const char *pszKey, ++ const char * /*pszValue*/ ) ++{ ++ // Hack ++ if( STARTS_WITH_CI(pszKey, "AWS_") ) ++ VSICurlAuthParametersChanged(); ++} ++ + /************************************************************************/ + /* CPLSetConfigOption() */ + /************************************************************************/ +@@ -1832,6 +1845,8 @@ void CPL_STDCALL + CPLSetConfigOption( const char *pszKey, const char *pszValue ) + + { ++ NotifyOtherComponentsConfigOptionChanged(pszKey, pszValue); ++ + #ifdef DEBUG_CONFIG_OPTIONS + CPLAccessConfigOption(pszKey, FALSE); + #endif +@@ -1885,6 +1900,8 @@ void CPL_STDCALL + CPLSetThreadLocalConfigOption( const char *pszKey, const char *pszValue ) + + { ++ NotifyOtherComponentsConfigOptionChanged(pszKey, pszValue); ++ + #ifdef DEBUG_CONFIG_OPTIONS + CPLAccessConfigOption(pszKey, FALSE); + #endif +diff --git a/gdal/port/cpl_vsil_curl.cpp b/gdal/port/cpl_vsil_curl.cpp +index 41713b0d404..5d49b9da989 100644 +--- a/gdal/port/cpl_vsil_curl.cpp ++++ b/gdal/port/cpl_vsil_curl.cpp +@@ -65,6 +65,11 @@ void VSICurlPartialClearCache(const char* ) + // Not supported. + } + ++void VSICurlAuthParametersChanged() ++{ ++ // Not supported. ++} ++ + /************************************************************************/ + /* VSICurlInstallReadCbk() */ + /************************************************************************/ +@@ -97,6 +102,17 @@ int VSICurlUninstallReadCbk( VSILFILE* /* fp */ ) + static int N_MAX_REGIONS = 1000; + static int DOWNLOAD_CHUNK_SIZE = 16384; + ++/***********************************************************รน************/ ++/* VSICurlAuthParametersChanged() */ ++/************************************************************************/ ++ ++static unsigned int gnGenerationAuthParameters = 0; ++ ++void VSICurlAuthParametersChanged() ++{ ++ gnGenerationAuthParameters++; ++} ++ + namespace cpl { + + /************************************************************************/ +@@ -2550,7 +2566,10 @@ VSICurlFilesystemHandler::GetCachedFileProp( const char* pszURL, + { + CPLMutexHolder oHolder( &hMutex ); + +- return oCacheFileProp.tryGet(std::string(pszURL), oFileProp); ++ return oCacheFileProp.tryGet(std::string(pszURL), oFileProp) && ++ // Let a chance to use new auth parameters ++ !(oFileProp.eExists == EXIST_NO && ++ gnGenerationAuthParameters != oFileProp.nGenerationAuthParameters); + } + + /************************************************************************/ +@@ -2559,10 +2578,11 @@ VSICurlFilesystemHandler::GetCachedFileProp( const char* pszURL, + + void + VSICurlFilesystemHandler::SetCachedFileProp( const char* pszURL, +- const FileProp& oFileProp ) ++ FileProp& oFileProp ) + { + CPLMutexHolder oHolder( &hMutex ); + ++ oFileProp.nGenerationAuthParameters = gnGenerationAuthParameters; + oCacheFileProp.insert(std::string(pszURL), oFileProp); + } + +@@ -2576,7 +2596,9 @@ VSICurlFilesystemHandler::GetCachedDirList( const char* pszURL, + { + CPLMutexHolder oHolder( &hMutex ); + +- return oCacheDirList.tryGet(std::string(pszURL), oCachedDirList); ++ return oCacheDirList.tryGet(std::string(pszURL), oCachedDirList) && ++ // Let a chance to use new auth parameters ++ gnGenerationAuthParameters == oCachedDirList.nGenerationAuthParameters; + } + + /************************************************************************/ +@@ -2585,7 +2607,7 @@ VSICurlFilesystemHandler::GetCachedDirList( const char* pszURL, + + void + VSICurlFilesystemHandler::SetCachedDirList( const char* pszURL, +- const CachedDirList& oCachedDirList ) ++ CachedDirList& oCachedDirList ) + { + CPLMutexHolder oHolder( &hMutex ); + +@@ -2606,6 +2628,7 @@ VSICurlFilesystemHandler::SetCachedDirList( const char* pszURL, + nCachedFilesInDirList -= oldValue.oFileList.size(); + oCacheDirList.remove(oldestKey); + } ++ oCachedDirList.nGenerationAuthParameters = gnGenerationAuthParameters; + + nCachedFilesInDirList += oCachedDirList.oFileList.size(); + oCacheDirList.insert(key, oCachedDirList); +diff --git a/gdal/port/cpl_vsil_curl_class.h b/gdal/port/cpl_vsil_curl_class.h +index 3121f1cf9de..69ffd273055 100644 +--- a/gdal/port/cpl_vsil_curl_class.h ++++ b/gdal/port/cpl_vsil_curl_class.h +@@ -69,6 +69,7 @@ typedef enum + class FileProp + { + public: ++ unsigned int nGenerationAuthParameters = 0; + ExistStatus eExists = EXIST_UNKNOWN; + vsi_l_offset fileSize = 0; + time_t mTime = 0; +@@ -83,6 +84,7 @@ class FileProp + typedef struct + { + bool bGotFileList = false; ++ unsigned int nGenerationAuthParameters = 0; + CPLStringList oFileList{}; /* only file name without path */ + } CachedDirList; + +@@ -244,7 +246,7 @@ class VSICurlFilesystemHandler : public VSIFilesystemHandler + bool GetCachedFileProp( const char* pszURL, + FileProp& oFileProp ); + void SetCachedFileProp( const char* pszURL, +- const FileProp& oFileProp ); ++ FileProp& oFileProp ); + void InvalidateCachedData( const char* pszURL ); + + CURLM *GetCurlMultiHandleFor( const CPLString& osURL ); +@@ -256,7 +258,7 @@ class VSICurlFilesystemHandler : public VSIFilesystemHandler + bool GetCachedDirList( const char* pszURL, + CachedDirList& oCachedDirList ); + void SetCachedDirList( const char* pszURL, +- const CachedDirList& oCachedDirList ); ++ CachedDirList& oCachedDirList ); + bool ExistsInCacheDirList( const CPLString& osDirname, bool *pbIsDir ); + + virtual CPLString GetURLFromFilename( const CPLString& osFilename ); +diff --git a/gdal/port/cpl_vsil_curl_priv.h b/gdal/port/cpl_vsil_curl_priv.h +index 63710fbb1a5..234c872198a 100644 +--- a/gdal/port/cpl_vsil_curl_priv.h ++++ b/gdal/port/cpl_vsil_curl_priv.h +@@ -50,4 +50,6 @@ int VSICurlInstallReadCbk( VSILFILE* fp, VSICurlReadCbkFunc pfnReadCbk, + int bStopOnInterruptUntilUninstall ); + int VSICurlUninstallReadCbk( VSILFILE* fp ); + ++void VSICurlAuthParametersChanged(); ++ + #endif // CPL_VSIL_CURL_PRIV_H_INCLUDED From 74890f0315017027658f432a8ee271ab1169af47 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 15:16:36 -0600 Subject: [PATCH 05/13] Use proper GDAL patch --- config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.sh b/config.sh index 560add9..048ebc6 100644 --- a/config.sh +++ b/config.sh @@ -172,7 +172,7 @@ function build_gdal { fetch_unpack http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz (cd gdal-${GDAL_VERSION} \ - && patch -u -p1 < ../patches/bd6cf7d527ec88fdd6cc3f078387683d683d0445.diff \ + && patch -u -p1 < ../patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff \ && patch -u -p1 < ../patches/2310.diff \ && ./configure \ --with-crypto=yes \ From d57e759c98a278b6995c7dadb2639561b5add131 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 15:58:36 -0600 Subject: [PATCH 06/13] -p2 --- config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index 048ebc6..79a9be8 100644 --- a/config.sh +++ b/config.sh @@ -172,8 +172,8 @@ function build_gdal { fetch_unpack http://download.osgeo.org/gdal/${GDAL_VERSION}/gdal-${GDAL_VERSION}.tar.gz (cd gdal-${GDAL_VERSION} \ - && patch -u -p1 < ../patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff \ - && patch -u -p1 < ../patches/2310.diff \ + && patch -u -p2 < ../patches/1937d70990182aef316ac76f0c7c8fb3647259b2.diff \ + && patch -u -p2 < ../patches/2310.diff \ && ./configure \ --with-crypto=yes \ --with-hide-internal-symbols \ From 5f40a8455a79125716b6f9bb2523102eee8c9ce8 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 16:33:13 -0600 Subject: [PATCH 07/13] Fix git and auditwheel pip spec --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd25919..4e4e3f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,35 +31,35 @@ jobs: env: - MB_PYTHON_VERSION=2.7 - NP_BUILD_DEP=numpy==1.10.4 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" - NP_TEST_DEP=numpy==1.11.3 - name: "Python 3.5 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.5 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.6 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.6 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.7 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.7 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.8 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.8 - NP_BUILD_DEP=numpy==1.17.3 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" - NP_TEST_DEP=numpy==1.17.3 - name: "Python 2.7 osx" os: osx From b603993b1d41a1e72065ee5741f285b4b4089be4 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 17:24:29 -0600 Subject: [PATCH 08/13] Put rasterio-specific pip env vars into wheel builder cmd --- config.sh | 2 +- env_vars.sh | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/config.sh b/config.sh index 79a9be8..d7637e4 100644 --- a/config.sh +++ b/config.sh @@ -323,7 +323,7 @@ function build_wheel_cmd { if [ -n "$(is_function "pre_build")" ]; then pre_build; fi stop_spinner if [ -n "$BUILD_DEPENDS" ]; then - pip install $(pip_opts) $BUILD_DEPENDS + PIP_NO_BUILD_ISOLATION=0 PIP_USE_PEP517=0 pip install $(pip_opts) $BUILD_DEPENDS fi (cd $repo_dir && $cmd $wheelhouse) repair_wheelhouse $wheelhouse diff --git a/env_vars.sh b/env_vars.sh index d536cfa..bfcad2d 100644 --- a/env_vars.sh +++ b/env_vars.sh @@ -17,6 +17,4 @@ export MACOSX_DEPLOYMENT_TARGET=10.9 export GDAL_CONFIG=/usr/local/bin/gdal-config export PACKAGE_DATA=1 export PROJ_LIB=/usr/local/share/proj -export PIP_NO_BUILD_ISOLATION=0 -export PIP_USE_PEP517=0 export AUDITWHEEL_EXTRA_LIB_NAME_TAG=rasterio From 5c236b26ce004fd46eeefbc56399bad3c0e9a217 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Tue, 5 May 2020 18:11:21 -0600 Subject: [PATCH 09/13] Move PEP 517 control to proper step --- config.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.sh b/config.sh index d7637e4..bfa4b1a 100644 --- a/config.sh +++ b/config.sh @@ -323,8 +323,8 @@ function build_wheel_cmd { if [ -n "$(is_function "pre_build")" ]; then pre_build; fi stop_spinner if [ -n "$BUILD_DEPENDS" ]; then - PIP_NO_BUILD_ISOLATION=0 PIP_USE_PEP517=0 pip install $(pip_opts) $BUILD_DEPENDS + pip install $(pip_opts) $BUILD_DEPENDS fi - (cd $repo_dir && $cmd $wheelhouse) + (cd $repo_dir && PIP_NO_BUILD_ISOLATION=0 PIP_USE_PEP517=0 $cmd $wheelhouse) repair_wheelhouse $wheelhouse } From 9417165b8f2a239efb9481570fb7ee100b1a01e2 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Wed, 6 May 2020 11:43:27 -0600 Subject: [PATCH 10/13] Use a patched auditwheel 2.1.1-extra-lib-name-tags --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e4e3f1..c9c93c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,35 +31,35 @@ jobs: env: - MB_PYTHON_VERSION=2.7 - NP_BUILD_DEP=numpy==1.10.4 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.11.3 - name: "Python 3.5 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.5 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.6 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.6 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.7 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.7 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.8 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.8 - NP_BUILD_DEP=numpy==1.17.3 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.17.3 - name: "Python 2.7 osx" os: osx From 5aa32d8d3364a9ba5ff322a52503ce4250591892 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Wed, 6 May 2020 13:45:57 -0600 Subject: [PATCH 11/13] Install patched auditwheel with system python --- .travis.yml | 7 +------ config.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c9c93c8..f4439e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,35 +31,30 @@ jobs: env: - MB_PYTHON_VERSION=2.7 - NP_BUILD_DEP=numpy==1.10.4 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.11.3 - name: "Python 3.5 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.5 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.6 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.6 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.7 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.7 - NP_BUILD_DEP=numpy==1.14.5 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.14.5 - name: "Python 3.8 x86_64 linux" os: linux env: - MB_PYTHON_VERSION=3.8 - NP_BUILD_DEP=numpy==1.17.3 - - AW_BUILD_DEP="git+https://github.com/sgillies/auditwheel.git@2.1.1-extra-lib-name-tags#egg=auditwheel" - NP_TEST_DEP=numpy==1.17.3 - name: "Python 2.7 osx" os: osx @@ -100,7 +95,7 @@ jobs: before_install: - python -c "import fcntl; fcntl.fcntl(1, fcntl.F_SETFL, 0)" - - BUILD_DEPENDS="$NP_BUILD_DEP $AW_BUILD_DEP cython==0.29.14 wheel==0.34.2" + - BUILD_DEPENDS="$NP_BUILD_DEP cython==0.29.14 wheel==0.34.2" - TEST_DEPENDS="$NP_TEST_DEP attrs==19.1.0 pytest==4.0.2 click==7.0.0 mock boto3 packaging hypothesis==4.38.1 wheel==0.34.2 $GEN_DEPS" - source multibuild/common_utils.sh - source multibuild/travis_steps.sh diff --git a/config.sh b/config.sh index bfa4b1a..d4296f7 100644 --- a/config.sh +++ b/config.sh @@ -315,6 +315,14 @@ function build_wheel_cmd { # WHEEL_SDIR (optional, default "wheelhouse") # BUILD_DEPENDS (optional, default "") # MANYLINUX_URL (optional, default "") (via pip_opts function) + + # Update the container's auditwheel with our patched version. + if [ -n "$IS_OSX" ]; then + : + else # manylinux + /opt/python/cp37-cp37m/bin/pip install -I "git+https://github.com/sgillies/auditwheel.git#egg=auditwheel" + fi + local cmd=${1:-pip_wheel_cmd} local repo_dir=${2:-$REPO_DIR} [ -z "$repo_dir" ] && echo "repo_dir not defined" && exit 1 From 41f935ddf5eb37fb8ab9d1ec14bf65d93026da90 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Wed, 6 May 2020 15:11:58 -0600 Subject: [PATCH 12/13] Turn on netcdf and GDAL build output --- config.sh | 4 ++-- env_vars.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.sh b/config.sh index d4296f7..48d4c03 100644 --- a/config.sh +++ b/config.sh @@ -273,9 +273,9 @@ function pre_build { suppress build_libwebp suppress build_geos suppress build_hdf5 - suppress build_netcdf + build_netcdf - suppress build_gdal + build_gdal } diff --git a/env_vars.sh b/env_vars.sh index bfcad2d..eae32f8 100644 --- a/env_vars.sh +++ b/env_vars.sh @@ -12,7 +12,7 @@ GDAL_VERSION=2.4.4 CURL_VERSION=7.54.0 NGHTTP2_VERSION=1.35.1 EXPAT_VERSION=2.2.6 -NETCDF_VERSION=4.7.4 +NETCDF_VERSION=4.6.2 export MACOSX_DEPLOYMENT_TARGET=10.9 export GDAL_CONFIG=/usr/local/bin/gdal-config export PACKAGE_DATA=1 From 8b1b4f4250f4c80063146f7933cb1d1e0606b516 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Wed, 6 May 2020 17:20:19 -0600 Subject: [PATCH 13/13] Re-suppress netcdf and gdal build output Kill off python 2.7 + macosx, it's no longer building and I give up. --- .travis.yml | 7 ------- config.sh | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4439e9..860c3df 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,13 +56,6 @@ jobs: - MB_PYTHON_VERSION=3.8 - NP_BUILD_DEP=numpy==1.17.3 - NP_TEST_DEP=numpy==1.17.3 - - name: "Python 2.7 osx" - os: osx - language: generic - env: - - MB_PYTHON_VERSION=2.7 - - NP_BUILD_DEP=numpy==1.10.4 - - NP_TEST_DEP=numpy==1.11.3 - name: "Python 3.5 osx" os: osx language: generic diff --git a/config.sh b/config.sh index 48d4c03..d4296f7 100644 --- a/config.sh +++ b/config.sh @@ -273,9 +273,9 @@ function pre_build { suppress build_libwebp suppress build_geos suppress build_hdf5 - build_netcdf + suppress build_netcdf - build_gdal + suppress build_gdal }