diff --git a/.github/workflows/linux_x86_64.yaml b/.github/workflows/linux_x86_64.yaml index 1d4d641c..e37110fd 100644 --- a/.github/workflows/linux_x86_64.yaml +++ b/.github/workflows/linux_x86_64.yaml @@ -73,8 +73,8 @@ jobs: PLAT: "${{ matrix.platform }}" MB_PYTHON_VERSION: "${{ matrix.python }}" MB_ML_VER: "2014" - BUILD_DEPENDS: "oldest-supported-numpy cython wheel" - TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" + BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.2" + TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.2" TRAVIS_OS_NAME: ${{ matrix.os-name }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: @@ -94,8 +94,8 @@ jobs: bash -x .github/workflows/build.sh - name: Build Wheel of Fiona env: - BUILD_DEPENDS: "oldest-supported-numpy cython==0.29.26 wheel==0.34.2" - TEST_DEPENDS: "oldest-supported-numpy attrs==21.4.0 pytest==6.2.5 click==8.0.3 mock boto3 packaging hypothesis==4.38.1 wheel==0.34.2 pytz" + BUILD_DEPENDS: "oldest-supported-numpy cython==0.29.26 wheel==0.34.2 numpy==1.26.2" + TEST_DEPENDS: "oldest-supported-numpy attrs==21.4.0 numpy==1.26.2 pytest==6.2.5 click==8.0.3 mock boto3 packaging hypothesis==4.38.1 wheel==0.34.2 pytz" run: | echo $PATH sudo apt install python3-virtualenv @@ -122,8 +122,8 @@ jobs: PLAT: "${{ matrix.platform }}" MB_PYTHON_VERSION: "${{ matrix.python }}" MB_ML_VER: "2014" - BUILD_DEPENDS: "numpy wheel" - TEST_DEPENDS: "numpy" + BUILD_DEPENDS: "numpy==1.26.2 wheel" + TEST_DEPENDS: "numpy==1.26.2" TRAVIS_OS_NAME: ${{ matrix.os-name }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: @@ -183,7 +183,7 @@ jobs: pip install --force-reinstall *${PYCUT}* cd $HOME git clone -b ${BRANCH_TEST} https://github.com/gem/oq-engine.git - cd oq-engine + cd oq-engine git status pip install -r requirements-py312-linux64.txt pip install -e . diff --git a/.github/workflows/macos_arm64.yaml b/.github/workflows/macos_arm64.yaml index f2541509..a12c7f9e 100644 --- a/.github/workflows/macos_arm64.yaml +++ b/.github/workflows/macos_arm64.yaml @@ -1,115 +1,116 @@ --- name: MacOS wheels ARM64 -on: [workflow_dispatch] +on: + workflow_dispatch: + inputs: + debug_enabled: + type: boolean + description: "tmate debugging enabled" + required: false + default: false + env: WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib jobs: - build_pyproj: - name: pyproj ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["self-hosted"] - python: ["3.9", "3.10", "3.11"] - platform: ["arm64"] - macos-target: ["12"] - os-name: ["osx"] - env: - REPO_DIR: pyproj - BUILD_COMMIT: 3.6.1 - PLAT: "${{ matrix.platform }}" - MB_PYTHON_VERSION: "${{ matrix.python }}" - MB_ML_VER: "2014" - BUILD_DEPENDS: "cython wheel" - TEST_DEPENDS: "cython" - TRAVIS_OS_NAME: ${{ matrix.os-name }} - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} - steps: - - uses: actions/checkout@v4 - - name: Setup cmake - run: | - export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" - echo $PATH - brew install cmake - echo "check python3" - python3 -c "import sys; print(sys.version)" - - name: Get code of pyproj - env: - REPO_DIR: pyproj - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: 3.6.1 - run: | - bash -x .github/workflows/build.sh - - name: Build Wheel of pyproj - env: - REPO_DIR: pyproj - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: 3.6.1 - run: | - bash -x .github/workflows/wheel.sh - - uses: actions/upload-artifact@v3 - with: - name: wheels - path: wheelhouse - - build_Fiona: - name: Fiona ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["self-hosted"] - python: ["3.9", "3.10", "3.11"] - platform: ["arm64"] - macos-target: ["12"] - os-name: ["osx"] - env: - REPO_DIR: Fiona - BUILD_COMMIT: 1.9.5 - GDAL_FIONA: 3.7.3 - PLAT: "${{ matrix.platform }}" - MB_PYTHON_VERSION: "${{ matrix.python }}" - MB_ML_VER: "2014" - BUILD_DEPENDS: "oldest-supported-numpy cython wheel" - TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" - TRAVIS_OS_NAME: ${{ matrix.os-name }} - MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Setup cmake - run: | - ls -lrt /opt/homebrew/bin/ - /opt/homebrew/bin/brew install cmake - echo "check python3" - python3 -c "import sys; print(sys.version)" - - name: Get code of Fiona - env: - REPO_DIR: Fiona - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: 1.9.5 - run: | - bash -x .github/workflows/build.sh - - name: Build Wheel of Fiona - env: - REPO_DIR: Fiona - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: 1.9.5 - BUILD_DEPENDS: "oldest-supported-numpy cython wheel" - TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" - run: | - bash -x .github/workflows/wheel.sh - - uses: actions/upload-artifact@v3 - with: - name: wheels - path: wheelhouse + # build_pyproj: + # name: pyproj ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: ["self-hosted"] + # python: ["3.10", "3.11", "3.12"] + # platform: ["arm64"] + # macos-target: ["13"] + # os-name: ["osx"] + # env: + # REPO_DIR: pyproj + # BUILD_COMMIT: 3.6.1 + # PLAT: "${{ matrix.platform }}" + # MB_PYTHON_VERSION: "${{ matrix.python }}" + # MB_ML_VER: "2014" + # BUILD_DEPENDS: "cython wheel" + # TEST_DEPENDS: "cython" + # TRAVIS_OS_NAME: ${{ matrix.os-name }} + # MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} + # steps: + # - uses: actions/checkout@v4 + # - name: Setup cmake + # run: | + # #brew install cmake + # export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" + # echo $PATH + # brew install cmake + # echo "check python3" + # python3 -c "import sys; print(sys.version)" + # - name: Get code of pyproj + # env: + # REPO_DIR: pyproj + # WHEEL_SDIR: wheelhouse + # BUILD_COMMIT: 3.6.1 + # run: | + # bash -x .github/workflows/build.sh + # - name: Build Wheel of pyproj + # env: + # REPO_DIR: pyproj + # WHEEL_SDIR: wheelhouse + # BUILD_COMMIT: 3.6.1 + # run: | + # bash -x .github/workflows/wheel.sh + # - uses: actions/upload-artifact@v3 + # with: + # name: wheels + # path: wheelhouse + # + # build_Fiona: + # name: Fiona ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: ["self-hosted"] + # python: ["3.10", "3.11", "3.12"] + # platform: ["arm64"] + # macos-target: ["13"] + # os-name: ["osx"] + # env: + # REPO_DIR: Fiona + # BUILD_COMMIT: 1.9.5 + # GDAL_FIONA: 3.7.3 + # PLAT: "${{ matrix.platform }}" + # MB_PYTHON_VERSION: "${{ matrix.python }}" + # MB_ML_VER: "2014" + # BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.2" + # TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.2" + # TRAVIS_OS_NAME: ${{ matrix.os-name }} + # MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} + # steps: + # - uses: actions/checkout@v4 + # with: + # submodules: true + # - name: Setup cmake + # run: | + # #brew install cmake + # #echo "check python3" + # #python3 -c "import sys; print(sys.version)" + # export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" + # echo $PATH + # brew install cmake + # echo "check python3" + # python3 -c "import sys; print(sys.version)" + # - name: Get code of Fiona + # run: | + # bash -x .github/workflows/build.sh + # - name: Build Wheel of Fiona + # env: + # BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.2" + # TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.2" + # run: | + # bash -x .github/workflows/wheel.sh + # - uses: actions/upload-artifact@v3 + # with: + # name: wheels + # path: wheelhouse build_GDAL: name: GDAL ${{ matrix.python }} ${{ matrix.os-name }} ${{ matrix.platform }} @@ -117,100 +118,106 @@ jobs: strategy: fail-fast: false matrix: - os: ["self-hosted"] - python: ["3.9", "3.10", "3.11"] + os: + ["self-hosted"] + #python: ["3.10", "3.11", "3.12"] + python: ["3.12"] platform: ["arm64"] - macos-target: ["12"] + macos-target: ["13"] os-name: ["osx"] env: REPO_DIR: gdal BUILD_COMMIT: v3.7.3 + WHEEL_SDIR: wheelhouse PLAT: "${{ matrix.platform }}" MB_PYTHON_VERSION: "${{ matrix.python }}" MB_ML_VER: "2014" - BUILD_DEPENDS: "numpy wheel" - TEST_DEPENDS: "numpy" + BUILD_DEPENDS: " numpy==1.26.2 wheel" + TEST_DEPENDS: "numpy==1.26.2" TRAVIS_OS_NAME: ${{ matrix.os-name }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: - uses: actions/checkout@v4 - name: Setup cmake run: | - ls -lrt /opt/homebrew/bin/ - /opt/homebrew/bin/brew install cmake + #brew install cmake + export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" + echo $PATH + brew install cmake echo "check python3" python3 -c "import sys; print(sys.version)" + echo "check cmake" + which cmake - name: Get code of gdal - env: - REPO_DIR: gdal - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: v3.7.3 run: | + export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" + echo $PATH bash -x .github/workflows/build.sh + #- name: Setup debugging session + # uses: mxschmitt/action-tmate@v3 + # if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - name: Build Wheel of GDAL - env: - REPO_DIR: gdal - WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib - BUILD_COMMIT: v3.7.3 run: | + export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" + echo $PATH bash -x .github/workflows/wheel.sh + sleep 3600 - uses: actions/upload-artifact@v3 with: name: wheels - path: wheelhouse + path: + wheelhouse - test_wheel: - needs: [build_GDAL, build_pyproj, build_Fiona] - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["self-hosted"] - python: ["3.9", "3.10", "3.11"] - platform: ["arm64"] - macos-target: ["12"] - os-name: ["osx"] - env: - BRANCH_TEST: master - PYTHON_VERSION: "${{ matrix.python }}" - steps: - - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: download artifact - uses: actions/download-artifact@v3 - id: download - with: - name: wheels - path: wheelhouse - - name: "Echo artifact download path" - run: echo ${{steps.download.outputs.download-path}} - - name: Test wheels with python ${{ matrix.python }} - shell: bash - run: | - set -x - echo "engine installation to test wheel" - python3 -m venv $HOME/openquake - source $HOME/openquake/bin/activate - pip install -U pip wheel setuptools - pip install -r https://raw.githubusercontent.com/gem/oq-engine/ae-new_whl_fiona/requirements-py311.txt - cd ${{steps.download.outputs.download-path}} - PYCUT=`echo "${PYTHON_VERSION//.}"` - ls *${PYCUT}* - pip install --force-reinstall *${PYCUT}* - cd $HOME - git clone https://github.com/gem/oq-engine.git - cd oq-engine && git checkout ${BRANCH_TEST} - git status - pip install -e . - cd $HOME/oq-engine - oq engine --upgrade-db - sleep 5 - pytest -vsx --color=yes openquake/sep/tests/test_utils.py - pytest -vsx --color=yes openquake/sep - pytest -vsx --color=yes openquake/calculators - oq engine --run https://downloads.openquake.org/jobs/risk_test.zip - pytest -vsx --color=yes openquake/hazardlib/tests/gsim/kotha_2020_test.py + # test_wheel: + # needs: [build_GDAL, build_pyproj, build_Fiona] + # runs-on: ${{ matrix.os }} + # strategy: + # fail-fast: false + # matrix: + # os: ["self-hosted"] + # python: ["3.12"] + # platform: ["arm64"] + # env: + # BRANCH_TEST: ae-py312 + # PYTHON_VERSION: "${{ matrix.python-version }}" + # steps: + # - name: Set up Python ${{ matrix.python }} + # uses: actions/setup-python@v5 + # with: + # python-version: ${{ matrix.python }} + # - name: download artifact + # uses: actions/download-artifact@v3 + # id: download + # with: + # name: wheels + # path: wheelhouse + # - name: "Echo artifact download path" + # run: echo ${{steps.download.outputs.download-path}} + # - name: Test wheels with python ${{ matrix.python-version }} + # shell: bash + # run: | + # set -x + # echo "engine installation to test wheel" + # python3 -m venv $HOME/openquake + # source $HOME/openquake/bin/activate + # pip install -U pip wheel setuptools + # cd ${{steps.download.outputs.download-path}} + # PYCUT=`echo "${PYTHON_VERSION//.}"` + # ls *${PYCUT}* + # pip install --force-reinstall *${PYCUT}* + # cd $HOME + # git clone -b ${BRANCH_TEST} https://github.com/gem/oq-engine.git + # cd oq-engine + # git status + # pip install -r requirements-py312-macos_arm64.txt + # pip install -e . + # cd $HOME/oq-engine + # oq engine --upgrade-db + # sleep 5 + # pip install pytest + # sleep 3 + # pytest -vsx --color=yes openquake/sep/tests/test_utils.py + # pytest -vsx --color=yes openquake/sep + # pytest -vsx --color=yes openquake/calculators + # oq engine --run https://downloads.openquake.org/jobs/risk_test.zip + # pytest -vsx --color=yes openquake/hazardlib/tests/gsim/kotha_2020_test.py diff --git a/.github/workflows/macos_x86_64.yaml b/.github/workflows/macos_x86_64.yaml index 48117ce5..7a03bec9 100644 --- a/.github/workflows/macos_x86_64.yaml +++ b/.github/workflows/macos_x86_64.yaml @@ -18,10 +18,10 @@ jobs: strategy: fail-fast: false matrix: - os: ["macos-12"] + os: ["macos-13"] python: ["3.10", "3.11", "3.12"] platform: ["x86_64"] - macos-target: ["11"] + macos-target: ["13"] os-name: ["osx"] env: REPO_DIR: pyproj @@ -42,7 +42,6 @@ jobs: env: REPO_DIR: pyproj WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib BUILD_COMMIT: 3.6.1 run: | bash -x .github/workflows/build.sh @@ -50,7 +49,6 @@ jobs: env: REPO_DIR: pyproj WHEEL_SDIR: wheelhouse - SETUPTOOLS_USE_DISTUTILS: stdlib BUILD_COMMIT: 3.6.1 run: | bash -x .github/workflows/wheel.sh @@ -65,10 +63,10 @@ jobs: strategy: fail-fast: false matrix: - os: ["macos-12"] + os: ["macos-13"] python: ["3.10", "3.11", "3.12"] platform: ["x86_64"] - macos-target: ["11"] + macos-target: ["13"] os-name: ["osx"] env: REPO_DIR: Fiona @@ -77,8 +75,8 @@ jobs: PLAT: "${{ matrix.platform }}" MB_PYTHON_VERSION: "${{ matrix.python }}" MB_ML_VER: "2014" - BUILD_DEPENDS: "oldest-supported-numpy cython wheel" - TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" + BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.2" + TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.2" TRAVIS_OS_NAME: ${{ matrix.os-name }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: @@ -95,8 +93,8 @@ jobs: bash -x .github/workflows/build.sh - name: Build Wheel of Fiona env: - BUILD_DEPENDS: "oldest-supported-numpy cython wheel" - TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz" + BUILD_DEPENDS: "oldest-supported-numpy cython wheel numpy==1.26.2" + TEST_DEPENDS: "oldest-supported-numpy attrs pytest click mock boto3 packaging hypothesis wheel pytz numpy==1.26.2" run: | bash -x .github/workflows/wheel.sh - uses: actions/upload-artifact@v3 @@ -110,10 +108,12 @@ jobs: strategy: fail-fast: false matrix: - os: ["macos-12"] - python: ["3.10", "3.11", "3.12"] + os: + ["macos-13"] + #python: ["3.10", "3.11", "3.12"] + python: ["3.12"] platform: ["x86_64"] - macos-target: ["11"] + macos-target: ["13"] os-name: ["osx"] env: REPO_DIR: gdal @@ -122,8 +122,8 @@ jobs: PLAT: "${{ matrix.platform }}" MB_PYTHON_VERSION: "${{ matrix.python }}" MB_ML_VER: "2014" - BUILD_DEPENDS: "numpy wheel" - TEST_DEPENDS: "numpy" + BUILD_DEPENDS: "wheel numpy==1.26.2" + TEST_DEPENDS: " numpy==1.26.2" TRAVIS_OS_NAME: ${{ matrix.os-name }} MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos-target }} steps: @@ -137,6 +137,9 @@ jobs: - name: Build Wheel of GDAL run: | bash -x .github/workflows/wheel.sh + - name: Setup debugging session + uses: mxschmitt/action-tmate@v3 + if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }} - uses: actions/upload-artifact@v3 with: name: wheels @@ -148,17 +151,15 @@ jobs: strategy: fail-fast: false matrix: - os: ["macos-12"] - python: ["3.10", "3.11", "3.12"] + os: ["macos-13"] + python-version: ["3.12"] platform: ["x86_64"] - macos-target: ["11"] - os-name: ["osx"] env: - BRANCH_TEST: master - PYTHON_VERSION: "${{ matrix.python }}" + BRANCH_TEST: ae-py312 + PYTHON_VERSION: "${{ matrix.python-version }}" steps: - name: Set up Python ${{ matrix.python }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - name: download artifact @@ -169,7 +170,7 @@ jobs: path: wheelhouse - name: "Echo artifact download path" run: echo ${{steps.download.outputs.download-path}} - - name: Test wheels with python ${{ matrix.python }} + - name: Test wheels with python ${{ matrix.python-version }} shell: bash run: | set -x @@ -177,19 +178,21 @@ jobs: python3 -m venv $HOME/openquake source $HOME/openquake/bin/activate pip install -U pip wheel setuptools - pip install -r https://raw.githubusercontent.com/gem/oq-engine/ae-new_whl_fiona/requirements-py311.txt cd ${{steps.download.outputs.download-path}} PYCUT=`echo "${PYTHON_VERSION//.}"` ls *${PYCUT}* pip install --force-reinstall *${PYCUT}* cd $HOME - git clone https://github.com/gem/oq-engine.git - cd oq-engine && git checkout ${BRANCH_TEST} + git clone -b ${BRANCH_TEST} https://github.com/gem/oq-engine.git + cd oq-engine git status + pip install -r requirements-py312-macos_x86_64.txt pip install -e . cd $HOME/oq-engine oq engine --upgrade-db sleep 5 + pip install pytest + sleep 3 pytest -vsx --color=yes openquake/sep/tests/test_utils.py pytest -vsx --color=yes openquake/sep pytest -vsx --color=yes openquake/calculators diff --git a/config.sh b/config.sh index d3010ef2..8d10d875 100644 --- a/config.sh +++ b/config.sh @@ -81,13 +81,12 @@ function build_jsonc { touch jsonc-stamp } - function build_tiff { + echo "Entering in the function of TIFF" if [ -e tiff-stamp ]; then return; fi build_zlib build_jpeg - #if [ -n "$IS_OSX" ]; then brew install curl; else echo "compilation on ML" ; fi - ensure_xz + build_xz fetch_unpack https://download.osgeo.org/libtiff/tiff-${TIFF_VERSION}.tar.gz (cd tiff-${TIFF_VERSION} \ && mv VERSION VERSION.txt \ @@ -98,7 +97,6 @@ function build_tiff { touch tiff-stamp } - function build_proj { CFLAGS="$CFLAGS -DPROJ_RENAME_SYMBOLS -g -O2" CXXFLAGS="$CXXFLAGS -DPROJ_RENAME_SYMBOLS -DPROJ_INTERNAL_CPP_NAMESPACE -g -O2" @@ -239,31 +237,32 @@ function build_gdal { -DCMAKE_LIBRARY_PATH=$BUILD_PREFIX/lib \ -DCMAKE_PROGRAM_PATH=$BUILD_PREFIX/bin \ -DCMAKE_OSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET \ - ${GEOS_CONFIG} \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF \ - -DOGR_BUILD_OPTIONAL_DRIVERS=ON \ - -DGDAL_USE_TIFF=ON \ - -DGDAL_USE_TIFF_INTERNAL=OFF \ - -DGDAL_USE_GEOTIFF_INTERNAL=ON \ - -DGDAL_ENABLE_DRIVER_GIF=ON \ - -DGDAL_ENABLE_DRIVER_GRIB=ON \ - -DGDAL_ENABLE_DRIVER_JPEG=ON \ - -DGDAL_USE_ICONV=ON \ - -DGDAL_USE_JSONC=ON \ - -DGDAL_USE_JSONC_INTERNAL=OFF \ - -DGDAL_USE_ZLIB=ON \ - -DGDAL_USE_ZLIB_INTERNAL=OFF \ - -DGDAL_ENABLE_DRIVER_PNG=ON \ - -DGDAL_ENABLE_DRIVER_OGCAPI=OFF \ - -DOGR_ENABLE_DRIVER_GPKG=ON \ - -DBUILD_PYTHON_BINDINGS=OFF \ - -DBUILD_JAVA_BINDINGS=OFF \ - -DBUILD_CSHARP_BINDINGS=OFF \ - -DGDAL_USE_SFCGAL=OFF \ - -DGDAL_USE_XERCESC=OFF \ - -DGDAL_USE_LIBXML2=OFF + ${GEOS_CONFIG} + # \ + #-DBUILD_SHARED_LIBS=ON \ + #-DCMAKE_BUILD_TYPE=Release \ + #-DGDAL_BUILD_OPTIONAL_DRIVERS=OFF \ + #-DOGR_BUILD_OPTIONAL_DRIVERS=ON \ + #-DGDAL_USE_TIFF=ON \ + #-DGDAL_USE_TIFF_INTERNAL=OFF \ + #-DGDAL_USE_GEOTIFF_INTERNAL=ON \ + #-DGDAL_ENABLE_DRIVER_GIF=ON \ + #-DGDAL_ENABLE_DRIVER_GRIB=ON \ + #-DGDAL_ENABLE_DRIVER_JPEG=ON \ + #-DGDAL_USE_ICONV=ON \ + #-DGDAL_USE_JSONC=ON \ + #-DGDAL_USE_JSONC_INTERNAL=OFF \ + #-DGDAL_USE_ZLIB=ON \ + #-DGDAL_USE_ZLIB_INTERNAL=OFF \ + #-DGDAL_ENABLE_DRIVER_PNG=ON \ + #-DGDAL_ENABLE_DRIVER_OGCAPI=OFF \ + #-DOGR_ENABLE_DRIVER_GPKG=ON \ + #-DBUILD_PYTHON_BINDINGS=OFF \ + #-DBUILD_JAVA_BINDINGS=OFF \ + #-DBUILD_CSHARP_BINDINGS=OFF \ + #-DGDAL_USE_SFCGAL=OFF \ + #-DGDAL_USE_XERCESC=OFF \ + #-DGDAL_USE_LIBXML2=OFF cmake --build . -j4 (if [ -n "$IS_OSX" ]; then sudo cmake --install . ; else cmake --install .; fi)) if [ -n "$IS_OSX" ]; then @@ -287,23 +286,23 @@ function pre_build { export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_RUN_PATH=$LD_RUN_PATH:/usr/local/lib fi - suppress build_nghttp2 - suppress build_openssl + build_nghttp2 + build_openssl # Remove previously installed curl. #sudo rm -rf /usr/local/lib/libcurl* if [ -n "$IS_OSX" ]; then sudo rm -rf /usr/local/lib/libcurl* ; else rm -rf /usr/local/lib/libcurl* ; fi fetch_unpack https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz - suppress build_zlib + build_zlib build_curl + build_tiff build_sqlite - suppress build_tiff build_proj if [[ "$REPO_DIR" != "pyproj" ]]; then - suppress build_jpeg - suppress build_libpng - suppress build_jsonc - suppress build_expat - suppress build_geos + build_jpeg + build_libpng + build_jsonc + build_expat + build_geos build_gdal fi if [ -n "$IS_OSX" ]; then @@ -360,7 +359,10 @@ function build_wheel_cmd { pip download GDAL==${GDAL_VERSION} tar xzvf GDAL-${GDAL_VERSION}.tar.gz cd GDAL-${GDAL_VERSION} - $cmd $wheelhouse + if [ "$(uname -m)" = "arm64" ]; then + GDAL_VERSION=$GDAL_VERSION ARCHFLAGS="-arch arm64" $cmd $wheelhouse --compile --no-cache-dir + fi + GDAL_VERSION=$GDAL_VERSION ARCHFLAGS="-arch amd64" $cmd $wheelhouse --compile --no-cache-dir fi if [ "$REPO_DIR" == "pyproj" ]; then pwd @@ -382,7 +384,7 @@ function macos_arm64_native_build_setup { # Setup native build for single arch arm_64 wheels export PLAT="arm64" # We don't want universal2 builds and only want an arm64 build - export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64" + export _PYTHON_HOST_PLATFORM="macosx-13.0-arm64" export ARCHFLAGS+=" -arch arm64" $@ } diff --git a/env_vars.sh b/env_vars.sh index ba103061..9c52a882 100644 --- a/env_vars.sh +++ b/env_vars.sh @@ -14,7 +14,7 @@ TIFF_VERSION=4.3.0 OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source/ OPENSSL_ROOT=openssl-1.1.1w OPENSSL_HASH=cf3098950cb4d853ad95c0841f1f9c6d3dc102dccfcacd521d93925208b76ac8 -export MACOSX_DEPLOYMENT_TARGET=10.15 +export MACOSX_DEPLOYMENT_TARGET=13.0 export GDAL_CONFIG=/usr/local/bin/gdal-config export PACKAGE_DATA=1 #from PROJ 9.x diff --git a/multibuild/common_utils.sh b/multibuild/common_utils.sh index 50049110..9bb3986c 100755 --- a/multibuild/common_utils.sh +++ b/multibuild/common_utils.sh @@ -165,6 +165,7 @@ function suppress { [ "$ret" -eq 0 ] || cat "$tmp" rm -f "$tmp" if [[ -n $errexit_set ]]; then set -e; fi + set -x return "$ret" } diff --git a/multibuild/library_builders.sh b/multibuild/library_builders.sh index 3fdef0a3..d38b5a39 100644 --- a/multibuild/library_builders.sh +++ b/multibuild/library_builders.sh @@ -70,7 +70,7 @@ function build_simple { (cd $name_version \ && ./configure --prefix=$BUILD_PREFIX $configure_args \ && make -j4 \ - && make install) + && if [ -n "$IS_OSX" ]; then sudo make install; else make install; fi) touch "${name}-stamp" } @@ -158,7 +158,7 @@ function build_jpeg { (cd jpeg-${JPEG_VERSION} \ && ./configure --prefix=$BUILD_PREFIX \ && make -j4 \ - && make install) + && if [ -n "$IS_OSX" ]; then sudo make install; else make install; fi) touch jpeg-stamp } @@ -190,7 +190,7 @@ function build_bzip2 { } function build_tiff { - set +x + set -x build_zlib build_jpeg ensure_xz diff --git a/multibuild/osx_utils.sh b/multibuild/osx_utils.sh index 5749acd3..754289e7 100644 --- a/multibuild/osx_utils.sh +++ b/multibuild/osx_utils.sh @@ -115,7 +115,7 @@ function macpython_sdk_list_for_version { local _return if [ "$(uname -m)" = "arm64" ]; then - _return="11.0" + _return="13.0" elif [ "$_major" -eq "2" ]; then [ $(lex_ver $_ver) -lt $(lex_ver 2.7.18) ] && _return="10.6" [ $(lex_ver $_ver) -ge $(lex_ver 2.7.15) ] && _return="$_return 10.9" @@ -486,7 +486,7 @@ function macos_arm64_cross_build_setup { sudo mkdir -p $BUILD_PREFIX/lib $BUILD_PREFIX/include sudo chown -R $USER $BUILD_PREFIX update_env_for_build_prefix - export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64" + export _PYTHON_HOST_PLATFORM="macosx-13.0-arm64" export CFLAGS+=" -arch arm64" export CXXFLAGS+=" -arch arm64" export CPPFLAGS+=" -arch arm64" @@ -495,7 +495,7 @@ function macos_arm64_cross_build_setup { export FC=$FC_ARM64 export F90=${F90_ARM64:-${FC}} export F77=${F77_ARM64:-${FC}} - export MACOSX_DEPLOYMENT_TARGET="11.0" + export MACOSX_DEPLOYMENT_TARGET="13.0" export CROSS_COMPILING=1 export LDFLAGS+=" -arch arm64 -L$BUILD_PREFIX/lib -Wl,-rpath,$BUILD_PREFIX/lib ${FC_ARM64_LDFLAGS:-}" # This would automatically let autoconf know that we are cross compiling for arm64 darwin @@ -506,7 +506,7 @@ function macos_arm64_native_build_setup { # Setup native build for single arch arm_64 wheels export PLAT="arm64" # We don't want universal2 builds and only want an arm64 build - export _PYTHON_HOST_PLATFORM="macosx-11.0-arm64" + export _PYTHON_HOST_PLATFORM="macosx-13.0-arm64" export ARCHFLAGS+=" -arch arm64" $@ }