From 3f21d1eea5d501243762af001f986658551c82c9 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Wed, 17 Jul 2024 20:44:33 -0700 Subject: [PATCH 01/14] Use GDAL 3.9.1 for release, add libkml and libspatialite to release --- .circleci/config.yml | 2 +- .github/workflows/docker-gdal.yml | 5 +++-- .github/workflows/release.yml | 6 +++--- CHANGES.md | 7 ++++++- ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile | 6 +++--- ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile | 4 ++-- ci/vcpkg.json | 13 ++++++++++--- pyproject.toml | 6 +++--- 8 files changed, 31 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5b207874..cad5db92 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - run: name: Build the Linux aarch64 wheels. command: | - python3 -m pip install --user cibuildwheel==2.17.0 + python3 -m pip install --user cibuildwheel==2.19.2 python3 -m cibuildwheel --output-dir wheelhouse - run: name: Test the wheels diff --git a/.github/workflows/docker-gdal.yml b/.github/workflows/docker-gdal.yml index e7e1835c..81e0385a 100644 --- a/.github/workflows/docker-gdal.yml +++ b/.github/workflows/docker-gdal.yml @@ -20,8 +20,9 @@ jobs: fail-fast: false matrix: container: - - "ghcr.io/osgeo/gdal:ubuntu-small-latest" # >= python 3.10.6 - - "ghcr.io/osgeo/gdal:ubuntu-small-3.8.3" # python 3.10.12 + - "ghcr.io/osgeo/gdal:ubuntu-small-latest" # >= python 3.12.3 + - "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" # python 3.12.3 + - "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.7.3" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.6.4" # python 3.10.6 - "osgeo/gdal:ubuntu-small-3.5.3" # python 3.8.10 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78df0125..58dc40e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: needs: [build-sdist] runs-on: ubuntu-latest container: - image: "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" + image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" steps: - name: Download sdist from artifacts @@ -160,7 +160,7 @@ jobs: path: | ${{ matrix.vcpkg_cache }} # bump the last digit to avoid using previous build cache - key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.8.5-cache0 + key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.1-cache0 # MacOS build requires aclocal, which is part of automake, but appears # to be missing in default image @@ -178,7 +178,7 @@ jobs: git reset --hard # pull latest version to ensure the required commit with GDAL 3.8 is available git pull - git checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049 + git checkout 73794ce5f63fd138fab999a22959ca7c6305d93c - name: Install GDAL env: diff --git a/CHANGES.md b/CHANGES.md index 99c837ae..ade29e9d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,6 @@ # CHANGELOG -## 0.9.1 (yyyy-mm-dd) +## 0.10.0 (yyyy-mm-dd) ### Bug fixes @@ -9,6 +9,11 @@ - Raise NotImplmentedError when user attempts to write to an open file handle (#442). - Prevent seek on read from compressed inputs (#443). +### Packaging + +- The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.1 + and includes the LIBKML and spatialite drivers. + ## 0.9.0 (2024-06-17) ### Improvements diff --git a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile index 2bf470d7..98732b3f 100644 --- a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile @@ -1,13 +1,13 @@ -FROM quay.io/pypa/manylinux2014_x86_64:2024-04-15-dd44d68 +FROM quay.io/pypa/manylinux2014_x86_64:2024-07-15-c746fd8 # building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) RUN yum install -y curl unzip zip tar perl-IPC-Cmd -# require python >= 3.7 (python 3.6 is default on base image) for meson +# require python >= 3.7 (python 3.6 is default on base image) for meson RUN ln -s /opt/python/cp38-cp38/bin/python3 /usr/bin/python3 RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \ - git -C /opt/vcpkg checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049 + git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg" ENV PATH="${PATH}:/opt/vcpkg" diff --git a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile index b739da87..557aae50 100644 --- a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile @@ -1,10 +1,10 @@ -FROM quay.io/pypa/manylinux_2_28_aarch64:2024-04-15-dd44d68 +FROM quay.io/pypa/manylinux_2_28_aarch64:2024-07-15-c746fd8 # building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \ - git -C /opt/vcpkg checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049 + git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg" ENV PATH="${PATH}:/opt/vcpkg" diff --git a/ci/vcpkg.json b/ci/vcpkg.json index 95ef73bf..b622bc5b 100644 --- a/ci/vcpkg.json +++ b/ci/vcpkg.json @@ -1,12 +1,19 @@ { "name": "pyogrio", - "version": "0.8.0", + "version": "0.10.0", "dependencies": [ { "name": "gdal", "default-features": false, - "features": ["recommended-features", "curl", "geos", "iconv"] + "features": [ + "recommended-features", + "curl", + "geos", + "iconv", + "libspatialite", + "libkml" + ] } ], - "builtin-baseline": "4f4a1821b2e8c7a2863e4df65a4d514f84144049" + "builtin-baseline": "73794ce5f63fd138fab999a22959ca7c6305d93c" } diff --git a/pyproject.toml b/pyproject.toml index a5c51bcf..0a356858 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ build-verbosity = 3 VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.8.5" +GDAL_VERSION = "3.9.1" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" @@ -34,7 +34,7 @@ repair-wheel-command = [ VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.8.5" +GDAL_VERSION = "3.9.1" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" @@ -48,7 +48,7 @@ repair-wheel-command = "delvewheel repair --add-path C:/vcpkg/installed/x64-wind VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/x64-windows-dynamic-release" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.8.5" +GDAL_VERSION = "3.9.1" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" From 65627eebd4c5024625c8dac1d7d39b032220c0fb Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Wed, 17 Jul 2024 21:02:42 -0700 Subject: [PATCH 02/14] Use uv for sdist / wheel test virtual envs --- .github/workflows/release.yml | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58dc40e6..527b64ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,17 +63,21 @@ jobs: name: pyogrio-sdist path: wheelhouse - - name: Install pip + - name: Create virtual environment run: | - apt-get update && apt-get install -y python3-pip + curl -LsSf https://astral.sh/uv/install.sh | sh + . $HOME/.cargo/env + uv venv .venv + echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV + echo "$PWD/.venv/bin" >> $GITHUB_PATH - name: Build from sdist and install test dependencies shell: bash run: | - python3 -m pip install --no-cache-dir wheelhouse/*.tar.gz - python3 -m pip install --no-cache-dir pytest pandas pyproj shapely>=2 - python3 -m pip install --no-cache-dir --no-deps geopandas - python3 -m pip list + uv pip install wheelhouse/*.tar.gz + uv pip install pytest pandas pyproj shapely>=2 + uv pip install --no-deps geopandas + uv pip list - name: Run tests shell: bash @@ -239,6 +243,14 @@ jobs: cache: "pip" cache-dependency-path: "ci/requirements-wheel-test.txt" + - name: Create virtual environment + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + . $HOME/.cargo/env + uv venv .venv + echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV + echo "$PWD/.venv/bin" >> $GITHUB_PATH + - name: Download wheels from artifacts uses: actions/download-artifact@v4 with: @@ -248,12 +260,12 @@ jobs: - name: Install dependencies and pyogrio wheel shell: bash run: | - python -m pip install -r ci/requirements-wheel-test.txt + uv pip install -r ci/requirements-wheel-test.txt if [ ${{ matrix.python-version }} != "3.12" ]; then - python -m pip install --no-deps geopandas + uv pip install --no-deps geopandas fi - python -m pip install --pre --find-links wheelhouse pyogrio - python -m pip list + uv pip install --pre --find-links wheelhouse pyogrio + uv pip list - name: Run tests shell: bash From 6ed1f4ebd61231099dea8e99c04ebeb7d08a3dbf Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Thu, 18 Jul 2024 14:33:29 -0700 Subject: [PATCH 03/14] Attempt to use manylinux_2_28 for x64 builds, standardize cmake file names --- .github/workflows/release.yml | 35 +++++++++++++------ CHANGES.md | 4 ++- ....cmake => x64-linux-dynamic-release.cmake} | 0 ...ic.cmake => x64-osx-dynamic-release.cmake} | 0 ...anylinux_2_28_x86_64-vcpkg-gdal.Dockerfile | 34 ++++++++++++++++++ 5 files changed, 61 insertions(+), 12 deletions(-) rename ci/custom-triplets/{x64-linux-dynamic.cmake => x64-linux-dynamic-release.cmake} (100%) rename ci/custom-triplets/{x64-osx-dynamic.cmake => x64-osx-dynamic-release.cmake} (100%) create mode 100644 ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 527b64ea..c1371444 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,11 +57,9 @@ jobs: image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" steps: - - name: Download sdist from artifacts - uses: actions/download-artifact@v4 - with: - name: pyogrio-sdist - path: wheelhouse + - name: Install packages + run: | + apt-get update && apt-get install -y build-essential python3-dev - name: Create virtual environment run: | @@ -71,6 +69,12 @@ jobs: echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV echo "$PWD/.venv/bin" >> $GITHUB_PATH + - name: Download sdist from artifacts + uses: actions/download-artifact@v4 + with: + name: pyogrio-sdist + path: wheelhouse + - name: Build from sdist and install test dependencies shell: bash run: | @@ -87,7 +91,7 @@ jobs: build-wheels-linux: name: Build wheels on Linux - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-latest" steps: - name: Checkout @@ -107,7 +111,7 @@ jobs: uses: docker/build-push-action@v6 with: context: . - file: ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile + file: ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile tags: manylinux-vcpkg-gdal:latest push: false load: true @@ -133,7 +137,7 @@ jobs: matrix: include: - os: "macos-12" - triplet: "x64-osx-dynamic" + triplet: "x64-osx-dynamic-release" arch: x86_64 vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" @@ -219,17 +223,26 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-20.04", "windows-latest", "macos-12", "macos-latest"] + os: + [ + "ubuntu-latest", + "ubuntu-20.04", + "windows-latest", + "macos-12", + "macos-latest", + ] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] include: + - os: "ubuntu-latest" + artifact: pyogrio-wheel-linux - os: "ubuntu-20.04" artifact: pyogrio-wheel-linux - os: "windows-latest" artifact: pyogrio-wheel-x64-windows-dynamic-release - os: "macos-12" - artifact: pyogrio-wheel-x64-osx-dynamic + artifact: pyogrio-wheel-x64-osx-dynamic-release - os: "macos-latest" - artifact: pyogrio-wheel-x64-osx-dynamic + artifact: pyogrio-wheel-x64-osx-dynamic-release steps: - name: Checkout diff --git a/CHANGES.md b/CHANGES.md index ade29e9d..5b61643e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,7 +12,9 @@ ### Packaging - The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.1 - and includes the LIBKML and spatialite drivers. + and includes the LIBKML and spatialite drivers (#589). +- Updates to manylinux_2_28 for building Linux x64 wheels; these will require + Linux versions with glibc >= 2.28 (#589). ## 0.9.0 (2024-06-17) diff --git a/ci/custom-triplets/x64-linux-dynamic.cmake b/ci/custom-triplets/x64-linux-dynamic-release.cmake similarity index 100% rename from ci/custom-triplets/x64-linux-dynamic.cmake rename to ci/custom-triplets/x64-linux-dynamic-release.cmake diff --git a/ci/custom-triplets/x64-osx-dynamic.cmake b/ci/custom-triplets/x64-osx-dynamic-release.cmake similarity index 100% rename from ci/custom-triplets/x64-osx-dynamic.cmake rename to ci/custom-triplets/x64-osx-dynamic-release.cmake diff --git a/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile new file mode 100644 index 00000000..58013803 --- /dev/null +++ b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile @@ -0,0 +1,34 @@ +FROM quay.io/pypa/manylinux_2_28_x86_64:2024-07-15-c746fd8 + +# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) +RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd + +RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \ + git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c + +ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg" +ENV PATH="${PATH}:/opt/vcpkg" + +ENV VCPKG_DEFAULT_TRIPLET="x64-linux-dynamic-release" + +# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786 +RUN bootstrap-vcpkg.sh && \ + mkdir -p /root/.vcpkg/ $HOME/.vcpkg && \ + touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt && \ + vcpkg integrate install && \ + vcpkg integrate bash + +COPY ci/custom-triplets/x64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic-release.cmake +# COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/ +COPY ci/vcpkg.json opt/vcpkg/ + +ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic-release/lib" +RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \ + --feature-flags="versions,manifests" \ + --x-manifest-root=opt/vcpkg \ + --x-install-root=opt/vcpkg/installed && \ + vcpkg list + +# setting git safe directory is required for properly building wheels when +# git >= 2.35.3 +RUN git config --global --add safe.directory "*" From bd8697bec475e24a245ed612df018087a4150361 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Thu, 18 Jul 2024 14:41:22 -0700 Subject: [PATCH 04/14] try again without libkml / spatialite --- ci/vcpkg.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/ci/vcpkg.json b/ci/vcpkg.json index b622bc5b..ea331f18 100644 --- a/ci/vcpkg.json +++ b/ci/vcpkg.json @@ -5,14 +5,7 @@ { "name": "gdal", "default-features": false, - "features": [ - "recommended-features", - "curl", - "geos", - "iconv", - "libspatialite", - "libkml" - ] + "features": ["recommended-features", "curl", "geos", "iconv"] } ], "builtin-baseline": "73794ce5f63fd138fab999a22959ca7c6305d93c" From cda6c7a3db779d9bf54e6a673eb0a14162574f48 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Thu, 18 Jul 2024 15:54:24 -0700 Subject: [PATCH 05/14] remove pip cache and use bash when setting up uv on Windows --- .github/workflows/release.yml | 15 +++++++-------- ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile | 1 - 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c1371444..a7ee6501 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,9 +78,9 @@ jobs: - name: Build from sdist and install test dependencies shell: bash run: | - uv pip install wheelhouse/*.tar.gz - uv pip install pytest pandas pyproj shapely>=2 - uv pip install --no-deps geopandas + uv pip install --no-cache wheelhouse/*.tar.gz + uv pip install --no-cache pytest pandas pyproj shapely>=2 + uv pip install --no-cache --no-deps geopandas uv pip list - name: Run tests @@ -253,10 +253,9 @@ jobs: with: python-version: ${{ matrix.python-version }} allow-prereleases: true - cache: "pip" - cache-dependency-path: "ci/requirements-wheel-test.txt" - name: Create virtual environment + shell: bash run: | curl -LsSf https://astral.sh/uv/install.sh | sh . $HOME/.cargo/env @@ -273,11 +272,11 @@ jobs: - name: Install dependencies and pyogrio wheel shell: bash run: | - uv pip install -r ci/requirements-wheel-test.txt + uv pip install --no-cache -r ci/requirements-wheel-test.txt if [ ${{ matrix.python-version }} != "3.12" ]; then - uv pip install --no-deps geopandas + uv pip install --no-cache --no-deps geopandas fi - uv pip install --pre --find-links wheelhouse pyogrio + uv pip install --no-cache --pre --find-links wheelhouse pyogrio uv pip list - name: Run tests diff --git a/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile index 58013803..915050d4 100644 --- a/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile @@ -19,7 +19,6 @@ RUN bootstrap-vcpkg.sh && \ vcpkg integrate bash COPY ci/custom-triplets/x64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic-release.cmake -# COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/ COPY ci/vcpkg.json opt/vcpkg/ ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic-release/lib" From 68366df0547c74e98c59898df2b0e2c8f0a5b136 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Thu, 18 Jul 2024 17:55:26 -0700 Subject: [PATCH 06/14] Try again with just libkml --- ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile | 2 -- ci/vcpkg.json | 8 +++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile index 557aae50..85f34958 100644 --- a/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile +++ b/ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile @@ -24,7 +24,6 @@ RUN bootstrap-vcpkg.sh && \ vcpkg integrate bash COPY ci/custom-triplets/arm64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/arm64-linux-dynamic-release.cmake -COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/ COPY ci/vcpkg.json opt/vcpkg/ # temporary workaround for https://github.com/microsoft/vcpkg/issues/36094 @@ -33,7 +32,6 @@ RUN git -C /opt/vcpkg apply vcpkg_linux_crosscompiling.patch ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/arm64-linux-dynamic-release/lib" RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \ - --overlay-ports=opt/vcpkg/custom-ports \ --feature-flags="versions,manifests" \ --x-manifest-root=opt/vcpkg \ --x-install-root=opt/vcpkg/installed && \ diff --git a/ci/vcpkg.json b/ci/vcpkg.json index ea331f18..9fc30fbc 100644 --- a/ci/vcpkg.json +++ b/ci/vcpkg.json @@ -5,7 +5,13 @@ { "name": "gdal", "default-features": false, - "features": ["recommended-features", "curl", "geos", "iconv"] + "features": [ + "recommended-features", + "curl", + "geos", + "iconv", + "libkml" + ] } ], "builtin-baseline": "73794ce5f63fd138fab999a22959ca7c6305d93c" From faa02f2a7b42d7e9cbbb45bf8db60b6b0d871719 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Fri, 19 Jul 2024 19:44:56 -0700 Subject: [PATCH 07/14] Use Arm64 wheel for macos-latest, force uv venv to activate before running tests, temporarily disable some jobs --- .github/workflows/release.yml | 250 +++++++++++++++++----------------- 1 file changed, 125 insertions(+), 125 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7ee6501..d6357df4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,113 +21,113 @@ concurrency: cancel-in-progress: true jobs: - build-sdist: - name: Build pyogrio sdist - runs-on: ubuntu-latest - - steps: - - name: Checkout source - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: "3.x" - - - name: Build a source tarball - run: | - python -m pip install --upgrade pip - python -m pip install build setuptools - python -m build --sdist - - - uses: actions/upload-artifact@v4 - with: - name: pyogrio-sdist - path: ./dist/*.tar.gz - retention-days: 5 - compression-level: 0 - - test-sdist: - name: Test sdist - needs: [build-sdist] - runs-on: ubuntu-latest - container: - image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" - - steps: - - name: Install packages - run: | - apt-get update && apt-get install -y build-essential python3-dev - - - name: Create virtual environment - run: | - curl -LsSf https://astral.sh/uv/install.sh | sh - . $HOME/.cargo/env - uv venv .venv - echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV - echo "$PWD/.venv/bin" >> $GITHUB_PATH - - - name: Download sdist from artifacts - uses: actions/download-artifact@v4 - with: - name: pyogrio-sdist - path: wheelhouse - - - name: Build from sdist and install test dependencies - shell: bash - run: | - uv pip install --no-cache wheelhouse/*.tar.gz - uv pip install --no-cache pytest pandas pyproj shapely>=2 - uv pip install --no-cache --no-deps geopandas - uv pip list - - - name: Run tests - shell: bash - run: | - cd .. - python3 -m pytest --pyargs pyogrio.tests -v - - build-wheels-linux: - name: Build wheels on Linux - runs-on: "ubuntu-latest" - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - with: - install: true - buildkitd-flags: --debug - - - name: Build Docker image with vcpkg and gdal - # using build-push-action (without push) to make use of cache arguments - uses: docker/build-push-action@v6 - with: - context: . - file: ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile - tags: manylinux-vcpkg-gdal:latest - push: false - load: true - cache-from: type=gha - cache-to: type=gha,mode=max - env: - BUILDKIT_PROGRESS: plain - - - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 - - - uses: actions/upload-artifact@v4 - with: - name: pyogrio-wheel-linux - path: ./wheelhouse/*.whl - compression-level: 0 + # build-sdist: + # name: Build pyogrio sdist + # runs-on: ubuntu-latest + + # steps: + # - name: Checkout source + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + + # - name: Set up Python + # uses: actions/setup-python@v5 + # with: + # python-version: "3.x" + + # - name: Build a source tarball + # run: | + # python -m pip install --upgrade pip + # python -m pip install build setuptools + # python -m build --sdist + + # - uses: actions/upload-artifact@v4 + # with: + # name: pyogrio-sdist + # path: ./dist/*.tar.gz + # retention-days: 5 + # compression-level: 0 + + # test-sdist: + # name: Test sdist + # needs: [build-sdist] + # runs-on: ubuntu-latest + # container: + # image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" + + # steps: + # - name: Install packages + # run: | + # apt-get update && apt-get install -y build-essential python3-dev + + # - name: Create virtual environment + # run: | + # curl -LsSf https://astral.sh/uv/install.sh | sh + # . $HOME/.cargo/env + # uv venv .venv + # echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV + # echo "$PWD/.venv/bin" >> $GITHUB_PATH + + # - name: Download sdist from artifacts + # uses: actions/download-artifact@v4 + # with: + # name: pyogrio-sdist + # path: wheelhouse + + # - name: Build from sdist and install test dependencies + # shell: bash + # run: | + # uv pip install --no-cache wheelhouse/*.tar.gz + # uv pip install --no-cache pytest pandas pyproj shapely>=2 + # uv pip install --no-cache --no-deps geopandas + # uv pip list + + # - name: Run tests + # shell: bash + # run: | + # cd .. + # python3 -m pytest --pyargs pyogrio.tests -v + + # build-wheels-linux: + # name: Build wheels on Linux + # runs-on: "ubuntu-latest" + + # steps: + # - name: Checkout + # uses: actions/checkout@v4 + # with: + # fetch-depth: 0 + + # - name: Set up Docker Buildx + # id: buildx + # uses: docker/setup-buildx-action@v3 + # with: + # install: true + # buildkitd-flags: --debug + + # - name: Build Docker image with vcpkg and gdal + # # using build-push-action (without push) to make use of cache arguments + # uses: docker/build-push-action@v6 + # with: + # context: . + # file: ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile + # tags: manylinux-vcpkg-gdal:latest + # push: false + # load: true + # cache-from: type=gha + # cache-to: type=gha,mode=max + # env: + # BUILDKIT_PROGRESS: plain + + # - name: Build wheels + # uses: pypa/cibuildwheel@v2.19.2 + + # - uses: actions/upload-artifact@v4 + # with: + # name: pyogrio-wheel-linux + # path: ./wheelhouse/*.whl + # compression-level: 0 build-wheels-mac-win: name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }}) @@ -136,11 +136,11 @@ jobs: fail-fast: false matrix: include: - - os: "macos-12" - triplet: "x64-osx-dynamic-release" - arch: x86_64 - vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" - vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" + # - os: "macos-12" + # triplet: "x64-osx-dynamic-release" + # arch: x86_64 + # vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" + # vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" - os: "macos-12" triplet: "arm64-osx-dynamic-release" @@ -223,26 +223,25 @@ jobs: strategy: fail-fast: false matrix: - os: - [ - "ubuntu-latest", - "ubuntu-20.04", + os: [ + # "ubuntu-latest", + # "ubuntu-20.04", "windows-latest", - "macos-12", + # "macos-12", "macos-latest", ] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] include: - - os: "ubuntu-latest" - artifact: pyogrio-wheel-linux - - os: "ubuntu-20.04" - artifact: pyogrio-wheel-linux + # - os: "ubuntu-latest" + # artifact: pyogrio-wheel-linux + # - os: "ubuntu-20.04" + # artifact: pyogrio-wheel-linux - os: "windows-latest" artifact: pyogrio-wheel-x64-windows-dynamic-release - - os: "macos-12" - artifact: pyogrio-wheel-x64-osx-dynamic-release + # - os: "macos-12" + # artifact: pyogrio-wheel-x64-osx-dynamic-release - os: "macos-latest" - artifact: pyogrio-wheel-x64-osx-dynamic-release + artifact: pyogrio-wheel-arm64-osx-dynamic-release steps: - name: Checkout @@ -276,12 +275,13 @@ jobs: if [ ${{ matrix.python-version }} != "3.12" ]; then uv pip install --no-cache --no-deps geopandas fi - uv pip install --no-cache --pre --find-links wheelhouse pyogrio + uv pip install --no-cache --pre --no-index --find-links wheelhouse pyogrio uv pip list - name: Run tests shell: bash run: | + . .venv/bin/activate cd .. python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" python -m pytest --pyargs pyogrio.tests -v From 7ff5eac6c34cb5ef9f0f736224f5a05ad1e0ffff Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Fri, 19 Jul 2024 19:47:07 -0700 Subject: [PATCH 08/14] fix config --- .github/workflows/release.yml | 64 ++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d6357df4..9da66308 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -218,7 +218,9 @@ jobs: test-wheels: name: Test wheels on ${{ matrix.os }} (Python ${{ matrix.python-version }}) - needs: [build-wheels-linux, build-wheels-mac-win] + # FIXME: + # needs: [build-wheels-linux, build-wheels-mac-win] + needs: [build-wheels-mac-win] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -286,37 +288,37 @@ jobs: python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" python -m pytest --pyargs pyogrio.tests -v - publish: - name: Publish pyogrio to GitHub / PyPI - needs: [test-sdist, test-wheels] - runs-on: ubuntu-latest - environment: - name: pypi - url: https://pypi.org/p/pyogrio - permissions: - id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPI - contents: write # this permission is required for the Github release action + # publish: + # name: Publish pyogrio to GitHub / PyPI + # needs: [test-sdist, test-wheels] + # runs-on: ubuntu-latest + # environment: + # name: pypi + # url: https://pypi.org/p/pyogrio + # permissions: + # id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPI + # contents: write # this permission is required for the Github release action - # release on every tag - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') + # # release on every tag + # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') - steps: - - uses: actions/download-artifact@v4 - with: - pattern: pyogrio-* - path: dist - merge-multiple: true + # steps: + # - uses: actions/download-artifact@v4 + # with: + # pattern: pyogrio-* + # path: dist + # merge-multiple: true - - name: Publish distribution to PyPI - uses: pypa/gh-action-pypi-publish@release/v1 + # - name: Publish distribution to PyPI + # uses: pypa/gh-action-pypi-publish@release/v1 - - name: Create GitHub Release - id: create_release - uses: softprops/action-gh-release@v2 - with: - name: Version ${{ github.ref_name }} - tag_name: ${{ github.ref }} - draft: false - prerelease: false - files: dist/*.tar.gz - token: ${{ secrets.GITHUB_TOKEN }} + # - name: Create GitHub Release + # id: create_release + # uses: softprops/action-gh-release@v2 + # with: + # name: Version ${{ github.ref_name }} + # tag_name: ${{ github.ref }} + # draft: false + # prerelease: false + # files: dist/*.tar.gz + # token: ${{ secrets.GITHUB_TOKEN }} From b2fbe36206a21a21d04e58e25439b06c1858a6c5 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Fri, 19 Jul 2024 20:22:14 -0700 Subject: [PATCH 09/14] Try setting up uv via powershell on Windows --- .github/workflows/release.yml | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9da66308..6f6f3538 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,11 +142,11 @@ jobs: # vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" # vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" - - os: "macos-12" - triplet: "arm64-osx-dynamic-release" - arch: arm64 - vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" - vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" + # - os: "macos-12" + # triplet: "arm64-osx-dynamic-release" + # arch: arm64 + # vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" + # vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" - os: "windows-2019" triplet: "x64-windows-dynamic-release" @@ -230,7 +230,7 @@ jobs: # "ubuntu-20.04", "windows-latest", # "macos-12", - "macos-latest", + # "macos-latest", ] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] include: @@ -242,8 +242,8 @@ jobs: artifact: pyogrio-wheel-x64-windows-dynamic-release # - os: "macos-12" # artifact: pyogrio-wheel-x64-osx-dynamic-release - - os: "macos-latest" - artifact: pyogrio-wheel-arm64-osx-dynamic-release + # - os: "macos-latest" + # artifact: pyogrio-wheel-arm64-osx-dynamic-release steps: - name: Checkout @@ -255,7 +255,8 @@ jobs: python-version: ${{ matrix.python-version }} allow-prereleases: true - - name: Create virtual environment + - name: Create virtual environment (Linux / MacOS) + if: ${{ runner.os != 'Windows' }} shell: bash run: | curl -LsSf https://astral.sh/uv/install.sh | sh @@ -264,6 +265,14 @@ jobs: echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV echo "$PWD/.venv/bin" >> $GITHUB_PATH + - name: Create virtual environment (Windows) + if: ${{ runner.os == 'Windows' }} + run: | + irm https://astral.sh/uv/install.ps1 | iex + uv venv .venv + "VIRTUAL_ENV=.venv" | Out-File -FilePath $env:GITHUB_ENV -Append + "$PWD/.venv/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append + - name: Download wheels from artifacts uses: actions/download-artifact@v4 with: @@ -283,7 +292,6 @@ jobs: - name: Run tests shell: bash run: | - . .venv/bin/activate cd .. python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" python -m pytest --pyargs pyogrio.tests -v From c13f6a30a49840631ba96a38a04eed91606d3d71 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Fri, 19 Jul 2024 20:47:02 -0700 Subject: [PATCH 10/14] Re-enable jobs --- .github/workflows/release.yml | 335 +++++++++++++++++----------------- 1 file changed, 167 insertions(+), 168 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6f6f3538..31354669 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,113 +21,113 @@ concurrency: cancel-in-progress: true jobs: - # build-sdist: - # name: Build pyogrio sdist - # runs-on: ubuntu-latest - - # steps: - # - name: Checkout source - # uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: "3.x" - - # - name: Build a source tarball - # run: | - # python -m pip install --upgrade pip - # python -m pip install build setuptools - # python -m build --sdist - - # - uses: actions/upload-artifact@v4 - # with: - # name: pyogrio-sdist - # path: ./dist/*.tar.gz - # retention-days: 5 - # compression-level: 0 - - # test-sdist: - # name: Test sdist - # needs: [build-sdist] - # runs-on: ubuntu-latest - # container: - # image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" - - # steps: - # - name: Install packages - # run: | - # apt-get update && apt-get install -y build-essential python3-dev - - # - name: Create virtual environment - # run: | - # curl -LsSf https://astral.sh/uv/install.sh | sh - # . $HOME/.cargo/env - # uv venv .venv - # echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV - # echo "$PWD/.venv/bin" >> $GITHUB_PATH - - # - name: Download sdist from artifacts - # uses: actions/download-artifact@v4 - # with: - # name: pyogrio-sdist - # path: wheelhouse - - # - name: Build from sdist and install test dependencies - # shell: bash - # run: | - # uv pip install --no-cache wheelhouse/*.tar.gz - # uv pip install --no-cache pytest pandas pyproj shapely>=2 - # uv pip install --no-cache --no-deps geopandas - # uv pip list - - # - name: Run tests - # shell: bash - # run: | - # cd .. - # python3 -m pytest --pyargs pyogrio.tests -v - - # build-wheels-linux: - # name: Build wheels on Linux - # runs-on: "ubuntu-latest" - - # steps: - # - name: Checkout - # uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - - # - name: Set up Docker Buildx - # id: buildx - # uses: docker/setup-buildx-action@v3 - # with: - # install: true - # buildkitd-flags: --debug - - # - name: Build Docker image with vcpkg and gdal - # # using build-push-action (without push) to make use of cache arguments - # uses: docker/build-push-action@v6 - # with: - # context: . - # file: ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile - # tags: manylinux-vcpkg-gdal:latest - # push: false - # load: true - # cache-from: type=gha - # cache-to: type=gha,mode=max - # env: - # BUILDKIT_PROGRESS: plain - - # - name: Build wheels - # uses: pypa/cibuildwheel@v2.19.2 - - # - uses: actions/upload-artifact@v4 - # with: - # name: pyogrio-wheel-linux - # path: ./wheelhouse/*.whl - # compression-level: 0 + build-sdist: + name: Build pyogrio sdist + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Build a source tarball + run: | + python -m pip install --upgrade pip + python -m pip install build setuptools + python -m build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: pyogrio-sdist + path: ./dist/*.tar.gz + retention-days: 5 + compression-level: 0 + + test-sdist: + name: Test sdist + needs: [build-sdist] + runs-on: ubuntu-latest + container: + image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" + + steps: + - name: Install packages + run: | + apt-get update && apt-get install -y build-essential python3-dev + + - name: Create virtual environment + run: | + curl -LsSf https://astral.sh/uv/install.sh | sh + . $HOME/.cargo/env + uv venv .venv + echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV + echo "$PWD/.venv/bin" >> $GITHUB_PATH + + - name: Download sdist from artifacts + uses: actions/download-artifact@v4 + with: + name: pyogrio-sdist + path: wheelhouse + + - name: Build from sdist and install test dependencies + shell: bash + run: | + uv pip install --no-cache wheelhouse/*.tar.gz + uv pip install --no-cache pytest pandas pyproj shapely>=2 + uv pip install --no-cache --no-deps geopandas + uv pip list + + - name: Run tests + shell: bash + run: | + cd .. + python3 -m pytest --pyargs pyogrio.tests -v + + build-wheels-linux: + name: Build wheels on Linux + runs-on: "ubuntu-latest" + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + with: + install: true + buildkitd-flags: --debug + + - name: Build Docker image with vcpkg and gdal + # using build-push-action (without push) to make use of cache arguments + uses: docker/build-push-action@v6 + with: + context: . + file: ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile + tags: manylinux-vcpkg-gdal:latest + push: false + load: true + cache-from: type=gha + cache-to: type=gha,mode=max + env: + BUILDKIT_PROGRESS: plain + + - name: Build wheels + uses: pypa/cibuildwheel@v2.19.2 + + - uses: actions/upload-artifact@v4 + with: + name: pyogrio-wheel-linux + path: ./wheelhouse/*.whl + compression-level: 0 build-wheels-mac-win: name: Build wheels on ${{ matrix.os }} (${{ matrix.arch }}) @@ -136,17 +136,17 @@ jobs: fail-fast: false matrix: include: - # - os: "macos-12" - # triplet: "x64-osx-dynamic-release" - # arch: x86_64 - # vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" - # vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" - - # - os: "macos-12" - # triplet: "arm64-osx-dynamic-release" - # arch: arm64 - # vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" - # vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" + - os: "macos-12" + triplet: "x64-osx-dynamic-release" + arch: x86_64 + vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" + vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" + + - os: "macos-12" + triplet: "arm64-osx-dynamic-release" + arch: arm64 + vcpkg_cache: "/Users/runner/.cache/vcpkg/archives" + vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log" - os: "windows-2019" triplet: "x64-windows-dynamic-release" @@ -218,32 +218,31 @@ jobs: test-wheels: name: Test wheels on ${{ matrix.os }} (Python ${{ matrix.python-version }}) - # FIXME: - # needs: [build-wheels-linux, build-wheels-mac-win] - needs: [build-wheels-mac-win] + needs: [build-wheels-linux, build-wheels-mac-win] runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ - # "ubuntu-latest", - # "ubuntu-20.04", + os: + [ + "ubuntu-latest", + "ubuntu-20.04", "windows-latest", - # "macos-12", - # "macos-latest", + "macos-12", + "macos-latest", ] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] include: - # - os: "ubuntu-latest" - # artifact: pyogrio-wheel-linux - # - os: "ubuntu-20.04" - # artifact: pyogrio-wheel-linux + - os: "ubuntu-latest" + artifact: pyogrio-wheel-linux + - os: "ubuntu-20.04" + artifact: pyogrio-wheel-linux - os: "windows-latest" artifact: pyogrio-wheel-x64-windows-dynamic-release - # - os: "macos-12" - # artifact: pyogrio-wheel-x64-osx-dynamic-release - # - os: "macos-latest" - # artifact: pyogrio-wheel-arm64-osx-dynamic-release + - os: "macos-12" + artifact: pyogrio-wheel-x64-osx-dynamic-release + - os: "macos-latest" + artifact: pyogrio-wheel-arm64-osx-dynamic-release steps: - name: Checkout @@ -296,37 +295,37 @@ jobs: python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" python -m pytest --pyargs pyogrio.tests -v - # publish: - # name: Publish pyogrio to GitHub / PyPI - # needs: [test-sdist, test-wheels] - # runs-on: ubuntu-latest - # environment: - # name: pypi - # url: https://pypi.org/p/pyogrio - # permissions: - # id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPI - # contents: write # this permission is required for the Github release action - - # # release on every tag - # if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') - - # steps: - # - uses: actions/download-artifact@v4 - # with: - # pattern: pyogrio-* - # path: dist - # merge-multiple: true - - # - name: Publish distribution to PyPI - # uses: pypa/gh-action-pypi-publish@release/v1 - - # - name: Create GitHub Release - # id: create_release - # uses: softprops/action-gh-release@v2 - # with: - # name: Version ${{ github.ref_name }} - # tag_name: ${{ github.ref }} - # draft: false - # prerelease: false - # files: dist/*.tar.gz - # token: ${{ secrets.GITHUB_TOKEN }} + publish: + name: Publish pyogrio to GitHub / PyPI + needs: [test-sdist, test-wheels] + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/pyogrio + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPI + contents: write # this permission is required for the Github release action + + # release on every tag + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/') + + steps: + - uses: actions/download-artifact@v4 + with: + pattern: pyogrio-* + path: dist + merge-multiple: true + + - name: Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + + - name: Create GitHub Release + id: create_release + uses: softprops/action-gh-release@v2 + with: + name: Version ${{ github.ref_name }} + tag_name: ${{ github.ref }} + draft: false + prerelease: false + files: dist/*.tar.gz + token: ${{ secrets.GITHUB_TOKEN }} From 23943201f9223258057fc5ce77735ab6b40f5c3d Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Sat, 20 Jul 2024 07:26:29 -0700 Subject: [PATCH 11/14] cleanup changelog --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 5b61643e..92f7935c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -12,7 +12,7 @@ ### Packaging - The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.1 - and includes the LIBKML and spatialite drivers (#589). + and includes the LIBKML driver (#589). - Updates to manylinux_2_28 for building Linux x64 wheels; these will require Linux versions with glibc >= 2.28 (#589). From 7148d175f3764fd38a01a913f59037fed34929f8 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Mon, 22 Jul 2024 07:52:30 -0700 Subject: [PATCH 12/14] Remove custom port of zlib --- .../zlib/0002-skip-building-examples.patch | 17 --------- ci/vcpkg-custom-ports/zlib/LICENSE | 20 ---------- ci/vcpkg-custom-ports/zlib/portfile.cmake | 38 ------------------- ci/vcpkg-custom-ports/zlib/usage | 4 -- .../zlib/vcpkg-cmake-wrapper.cmake | 12 ------ ci/vcpkg-custom-ports/zlib/vcpkg.json | 7 ---- 6 files changed, 98 deletions(-) delete mode 100644 ci/vcpkg-custom-ports/zlib/0002-skip-building-examples.patch delete mode 100644 ci/vcpkg-custom-ports/zlib/LICENSE delete mode 100644 ci/vcpkg-custom-ports/zlib/portfile.cmake delete mode 100644 ci/vcpkg-custom-ports/zlib/usage delete mode 100644 ci/vcpkg-custom-ports/zlib/vcpkg-cmake-wrapper.cmake delete mode 100644 ci/vcpkg-custom-ports/zlib/vcpkg.json diff --git a/ci/vcpkg-custom-ports/zlib/0002-skip-building-examples.patch b/ci/vcpkg-custom-ports/zlib/0002-skip-building-examples.patch deleted file mode 100644 index d18885a8..00000000 --- a/ci/vcpkg-custom-ports/zlib/0002-skip-building-examples.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index ee25365..40a1936 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -171,6 +171,7 @@ endif() - # Example binaries - #============================================================================ - -+if (0) - add_executable(example test/example.c) - target_link_libraries(example zlib) - add_test(example example) -@@ -188,3 +189,4 @@ if(HAVE_OFF64_T) - target_link_libraries(minigzip64 zlib) - set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64") - endif() -+endif() diff --git a/ci/vcpkg-custom-ports/zlib/LICENSE b/ci/vcpkg-custom-ports/zlib/LICENSE deleted file mode 100644 index ca5fddfe..00000000 --- a/ci/vcpkg-custom-ports/zlib/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ - Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu \ No newline at end of file diff --git a/ci/vcpkg-custom-ports/zlib/portfile.cmake b/ci/vcpkg-custom-ports/zlib/portfile.cmake deleted file mode 100644 index bed8dce4..00000000 --- a/ci/vcpkg-custom-ports/zlib/portfile.cmake +++ /dev/null @@ -1,38 +0,0 @@ -set(VERSION 1.2.5.2) - -vcpkg_download_distfile(ARCHIVE_FILE - URLS "http://zlib.net/fossils/zlib-1.2.5.2.tar.gz" - FILENAME "zlib-1.2.5.2.tar.gz" - SHA512 d4bd29ebfd5642253cecb9b8364ee6de87442d192229a9080cc306b819745e80c0791bd0a8abefd0c5e11c958bc85485d5d5d051b4770e45f6f479f3bb16e867 -) - -vcpkg_extract_source_archive_ex( - OUT_SOURCE_PATH SOURCE_PATH - ARCHIVE ${ARCHIVE_FILE} - REF ${VERSION} - PATCHES - "0002-skip-building-examples.patch" -) - -# This is generated during the cmake build -file(REMOVE ${SOURCE_PATH}/zconf.h) - -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA - OPTIONS - -DSKIP_INSTALL_FILES=ON - OPTIONS_DEBUG - -DSKIP_INSTALL_HEADERS=ON -) - -vcpkg_install_cmake() -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) - -vcpkg_fixup_pkgconfig() - -file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) - -vcpkg_copy_pdbs() - -file(COPY ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT}) diff --git a/ci/vcpkg-custom-ports/zlib/usage b/ci/vcpkg-custom-ports/zlib/usage deleted file mode 100644 index 39d86182..00000000 --- a/ci/vcpkg-custom-ports/zlib/usage +++ /dev/null @@ -1,4 +0,0 @@ -The package zlib is compatible with built-in CMake targets: - - find_package(ZLIB REQUIRED) - target_link_libraries(main PRIVATE ZLIB::ZLIB) diff --git a/ci/vcpkg-custom-ports/zlib/vcpkg-cmake-wrapper.cmake b/ci/vcpkg-custom-ports/zlib/vcpkg-cmake-wrapper.cmake deleted file mode 100644 index 8624b708..00000000 --- a/ci/vcpkg-custom-ports/zlib/vcpkg-cmake-wrapper.cmake +++ /dev/null @@ -1,12 +0,0 @@ -find_path(ZLIB_INCLUDE_DIR NAMES zlib.h PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include" NO_DEFAULT_PATH) -find_library(ZLIB_LIBRARY_RELEASE NAMES zlib z PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib" NO_DEFAULT_PATH) -find_library(ZLIB_LIBRARY_DEBUG NAMES zlibd z PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib" NO_DEFAULT_PATH) -if(NOT ZLIB_INCLUDE_DIR OR NOT (ZLIB_LIBRARY_RELEASE OR ZLIB_LIBRARY_DEBUG)) - message(FATAL_ERROR "Broken installation of vcpkg port zlib") -endif() -if(CMAKE_VERSION VERSION_LESS 3.4) - include(SelectLibraryConfigurations) - select_library_configurations(ZLIB) - unset(ZLIB_FOUND) -endif() -_find_package(${ARGS}) diff --git a/ci/vcpkg-custom-ports/zlib/vcpkg.json b/ci/vcpkg-custom-ports/zlib/vcpkg.json deleted file mode 100644 index c9ccf36b..00000000 --- a/ci/vcpkg-custom-ports/zlib/vcpkg.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "zlib", - "version": "1.2.5.2", - "port-version": 0, - "description": "A compression library", - "homepage": "https://www.zlib.net/" -} From 0c50d31317ddd5c64038ae9bededa9925f921997 Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Mon, 19 Aug 2024 15:24:04 -0700 Subject: [PATCH 13/14] GDAL 3.9.2 / cibuildwheel 2.20.0 --- .circleci/config.yml | 2 +- .github/workflows/docker-gdal.yml | 2 +- .github/workflows/release.yml | 8 ++++---- CHANGES.md | 2 +- pyproject.toml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cad5db92..af135db3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: - run: name: Build the Linux aarch64 wheels. command: | - python3 -m pip install --user cibuildwheel==2.19.2 + python3 -m pip install --user cibuildwheel==2.20.0 python3 -m cibuildwheel --output-dir wheelhouse - run: name: Test the wheels diff --git a/.github/workflows/docker-gdal.yml b/.github/workflows/docker-gdal.yml index 81e0385a..71d68407 100644 --- a/.github/workflows/docker-gdal.yml +++ b/.github/workflows/docker-gdal.yml @@ -21,7 +21,7 @@ jobs: matrix: container: - "ghcr.io/osgeo/gdal:ubuntu-small-latest" # >= python 3.12.3 - - "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" # python 3.12.3 + - "ghcr.io/osgeo/gdal:ubuntu-small-3.9.2" # python 3.12.3 - "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.7.3" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.6.4" # python 3.10.6 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31354669..a41b4876 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -54,7 +54,7 @@ jobs: needs: [build-sdist] runs-on: ubuntu-latest container: - image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.1" + image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.2" steps: - name: Install packages @@ -121,7 +121,7 @@ jobs: BUILDKIT_PROGRESS: plain - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.20.0 - uses: actions/upload-artifact@v4 with: @@ -168,7 +168,7 @@ jobs: path: | ${{ matrix.vcpkg_cache }} # bump the last digit to avoid using previous build cache - key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.1-cache0 + key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.2-cache0 # MacOS build requires aclocal, which is part of automake, but appears # to be missing in default image @@ -204,7 +204,7 @@ jobs: path: ${{ matrix.vcpkg_logs }} - name: Build wheels - uses: pypa/cibuildwheel@v2.19.2 + uses: pypa/cibuildwheel@v2.20.0 env: # CIBW needs to know triplet for the correct install path VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }} diff --git a/CHANGES.md b/CHANGES.md index 92f7935c..d87717a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,7 +11,7 @@ ### Packaging -- The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.1 +- The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.2 and includes the LIBKML driver (#589). - Updates to manylinux_2_28 for building Linux x64 wheels; these will require Linux versions with glibc >= 2.28 (#589). diff --git a/pyproject.toml b/pyproject.toml index 0a356858..4a4bc935 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ build-verbosity = 3 VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.9.1" +GDAL_VERSION = "3.9.2" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" @@ -34,7 +34,7 @@ repair-wheel-command = [ VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/$VCPKG_DEFAULT_TRIPLET" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.9.1" +GDAL_VERSION = "3.9.2" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" @@ -48,7 +48,7 @@ repair-wheel-command = "delvewheel repair --add-path C:/vcpkg/installed/x64-wind VCPKG_INSTALL = "$VCPKG_INSTALLATION_ROOT/installed/x64-windows-dynamic-release" GDAL_INCLUDE_PATH = "$VCPKG_INSTALL/include" GDAL_LIBRARY_PATH = "$VCPKG_INSTALL/lib" -GDAL_VERSION = "3.9.1" +GDAL_VERSION = "3.9.2" PYOGRIO_PACKAGE_DATA = 1 GDAL_DATA = "$VCPKG_INSTALL/share/gdal" PROJ_LIB = "$VCPKG_INSTALL/share/proj" From a8fb230d6f384badd439a308cfe915894129475a Mon Sep 17 00:00:00 2001 From: "Brendan C. Ward" Date: Tue, 27 Aug 2024 19:51:59 -0700 Subject: [PATCH 14/14] PR feedback --- .github/workflows/release.yml | 14 ++----- CHANGES.md | 15 +++----- ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile | 38 ------------------- 3 files changed, 10 insertions(+), 57 deletions(-) delete mode 100644 ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a41b4876..740e565b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -66,8 +66,6 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh . $HOME/.cargo/env uv venv .venv - echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV - echo "$PWD/.venv/bin" >> $GITHUB_PATH - name: Download sdist from artifacts uses: actions/download-artifact@v4 @@ -87,7 +85,7 @@ jobs: shell: bash run: | cd .. - python3 -m pytest --pyargs pyogrio.tests -v + uv run python -m pytest --pyargs pyogrio.tests -v build-wheels-linux: name: Build wheels on Linux @@ -184,7 +182,7 @@ jobs: cd $VCPKG_INSTALLATION_ROOT # on mac the clone is not clean, otherwise git pull fails git reset --hard - # pull latest version to ensure the required commit with GDAL 3.8 is available + # pull latest version to ensure the required commit with GDAL 3.9 is available git pull git checkout 73794ce5f63fd138fab999a22959ca7c6305d93c @@ -261,16 +259,12 @@ jobs: curl -LsSf https://astral.sh/uv/install.sh | sh . $HOME/.cargo/env uv venv .venv - echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV - echo "$PWD/.venv/bin" >> $GITHUB_PATH - name: Create virtual environment (Windows) if: ${{ runner.os == 'Windows' }} run: | irm https://astral.sh/uv/install.ps1 | iex uv venv .venv - "VIRTUAL_ENV=.venv" | Out-File -FilePath $env:GITHUB_ENV -Append - "$PWD/.venv/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append - name: Download wheels from artifacts uses: actions/download-artifact@v4 @@ -292,8 +286,8 @@ jobs: shell: bash run: | cd .. - python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" - python -m pytest --pyargs pyogrio.tests -v + uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')" + uv run python -m pytest --pyargs pyogrio.tests -v publish: name: Publish pyogrio to GitHub / PyPI diff --git a/CHANGES.md b/CHANGES.md index 681072c7..214ab946 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,15 +2,6 @@ ## 0.10.0 (yyyy-mm-dd) -### Packaging - -- For the conda-forge package, change the dependency from `libgdal` to - `libgdal-core`. This package is significantly smaller as it doesn't contain - some large GDAL plugins. Extra plugins can be installed as seperate conda - packages if needed: more info [here](https://gdal.org/download.html#conda). - This also leads to `pyproj` becoming an optional dependency; you will need - to install `pyproj` in order to support spatial reference systems (#452). - ### Bug fixes - Silence warning from `write_dataframe` with `GeoSeries.notna()` (#435). @@ -20,6 +11,12 @@ ### Packaging +- For the conda-forge package, change the dependency from `libgdal` to + `libgdal-core`. This package is significantly smaller as it doesn't contain + some large GDAL plugins. Extra plugins can be installed as seperate conda + packages if needed: more info [here](https://gdal.org/download.html#conda). + This also leads to `pyproj` becoming an optional dependency; you will need + to install `pyproj` in order to support spatial reference systems (#452). - The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.2 and includes the LIBKML driver (#589). - Updates to manylinux_2_28 for building Linux x64 wheels; these will require diff --git a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile b/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile deleted file mode 100644 index 7663b71a..00000000 --- a/ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile +++ /dev/null @@ -1,38 +0,0 @@ -FROM quay.io/pypa/manylinux2014_x86_64:2024-08-12-7fde9b1 - -# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988) -RUN yum install -y curl unzip zip tar perl-IPC-Cmd - -# require python >= 3.7 (python 3.6 is default on base image) for meson -RUN ln -s /opt/python/cp38-cp38/bin/python3 /usr/bin/python3 - -RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \ - git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c - -ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg" -ENV PATH="${PATH}:/opt/vcpkg" - -ENV VCPKG_DEFAULT_TRIPLET="x64-linux-dynamic" - -# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786 -RUN bootstrap-vcpkg.sh && \ - mkdir -p /root/.vcpkg/ $HOME/.vcpkg && \ - touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt && \ - vcpkg integrate install && \ - vcpkg integrate bash - -COPY ci/custom-triplets/x64-linux-dynamic.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic.cmake -COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/ -COPY ci/vcpkg.json opt/vcpkg/ - -ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic/lib" -RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \ - --overlay-ports=opt/vcpkg/custom-ports \ - --feature-flags="versions,manifests" \ - --x-manifest-root=opt/vcpkg \ - --x-install-root=opt/vcpkg/installed && \ - vcpkg list - -# setting git safe directory is required for properly building wheels when -# git >= 2.35.3 -RUN git config --global --add safe.directory "*"