unset GDAL_DATA and PROJ_DATA #25
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
name: macOS wheels | |
on: [push, pull_request, workflow_dispatch] | |
env: | |
REPO_DIR: Fiona | |
BUILD_COMMIT: rel-1.10.0 | |
BUILD_PREFIX: /private/tmp/local | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-macos-wheels: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "macOS x86_64" | |
os: macos-13 | |
cibw_arch: x86_64 | |
macosx_deployment_target: "10.15" | |
- name: "macOS arm64" | |
os: macos-14 | |
cibw_arch: arm64 | |
macosx_deployment_target: "11.0" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Remove homebrew packages | |
run: | | |
brew remove -f --ignore-dependencies liblerc webp zstd libtiff libxcb libxdcmp curl php lcms2 xmlto ghostscript lz4 openjpeg xz gettext giflib rtmpdump brotli | |
- name: Make dependency build directories | |
run: | | |
mkdir -p ${BUILD_PREFIX}/include | |
mkdir -p ${BUILD_PREFIX}/lib/pkgconfig | |
mkdir -p ${BUILD_PREFIX}/bin | |
mkdir -p ${BUILD_PREFIX}/share/doc | |
mkdir -p ${BUILD_PREFIX}/share/man/man{1,3,5,7} | |
- name: Build dependencies | |
shell: bash | |
run: | | |
source multibuild/common_utils.sh | |
source multibuild/library_builders.sh | |
source config.sh | |
pre_build | |
env: | |
LD_LIBRARY_PATH: ${{ env.BUILD_PREFIX }}/lib:${LD_LIBRARY_PATH} | |
DYLD_LIBRARY_PATH: ${LD_LIBRARY_PATH} | |
PLAT: ${{ matrix.cibw_arch }} | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} | |
PROJ_DATA: ${{ env.BUILD_PREFIX }}/share/proj | |
- name: Reinstall brew packages | |
run: | | |
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 brew install gettext pcre2 | |
- name: Checkout Fiona | |
shell: bash | |
run: | | |
rm -rf ${REPO_DIR} | |
git clone --depth 1 --branch ${BUILD_COMMIT} https://github.com/Toblerity/Fiona.git ${REPO_DIR} | |
cd ${REPO_DIR} | |
git checkout ${BUILD_COMMIT} | |
- name: Install cibuildwheel | |
run: | | |
python3 -m pip install cibuildwheel==2.20.0 | |
- name: Remove homebrew packages | |
run: | | |
brew remove -f --ignore-dependencies liblerc webp zstd libtiff libxcb libxdcmp curl php lcms2 xmlto ghostscript lz4 openjpeg xz gettext giflib rtmpdump brotli | |
- name: Build wheels | |
run: | | |
python3 -m cibuildwheel --output-dir wheelhouse Fiona | |
env: | |
GDAL_CONFIG: ${{ env.BUILD_PREFIX }}/bin/gdal-config | |
PACKAGE_DATA: 1 | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macosx_deployment_target }} | |
CIBW_ARCHS: ${{ matrix.cibw_arch }} | |
CIBW_BUILD: ${{ matrix.build }} | |
CIBW_SKIP: pp* | |
CIBW_FREE_THREADED_SUPPORT: True | |
CIBW_PRERELEASE_PYTHONS: True | |
CIBW_TEST_REQUIRES: "attrs pytest click mock boto3 packaging hypothesis wheel pytz fsspec aiohttp requests pyparsing shapely" | |
CIBW_TEST_COMMAND: "cp -R {package}/tests tests && unset GDAL_DATA && unset PROJ_DATA && GDAL_ENABLE_DEPRECATED_DRIVER_GTM=YES python -m pytest -vv tests -k 'not test_collection_zip_http and not test_mask_polygon_triangle and not test_show_versions and not test_append_or_driver_error and not [PCIDSK] and not cannot_append[FlatGeobuf]'" | |
CIBW_REPAIR_WHEEL_COMMAND: DYLD_LIBRARY_PATH=${{ env.BUILD_PREFIX }}/lib:${DYLD_LIBRARY_PATH} delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }}-${{ matrix.cibw_arch }}${{ matrix.manylinux && format('-{0}', matrix.manylinux) }} | |
path: ./wheelhouse/*.whl | |