Skip to content

Commit a5fccad

Browse files
authored
BLD/RLS: Update wheels to include GDAL 3.9.2 and add manylinux_2_28 wheels (#466)
1 parent 412a441 commit a5fccad

11 files changed

+159
-62
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- run:
2121
name: Build the Linux aarch64 wheels.
2222
command: |
23-
python3 -m pip install --user cibuildwheel==2.17.0
23+
python3 -m pip install --user cibuildwheel==2.20.0
2424
python3 -m cibuildwheel --output-dir wheelhouse
2525
- run:
2626
name: Test the wheels

.github/workflows/docker-gdal.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
container:
23-
- "ghcr.io/osgeo/gdal:ubuntu-small-latest" # >= python 3.10.6
24-
- "ghcr.io/osgeo/gdal:ubuntu-small-3.8.3" # python 3.10.12
23+
- "ghcr.io/osgeo/gdal:ubuntu-small-latest" # >= python 3.12.3
24+
- "ghcr.io/osgeo/gdal:ubuntu-small-3.9.2" # python 3.12.3
25+
- "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" # python 3.10.12
2526
- "ghcr.io/osgeo/gdal:ubuntu-small-3.7.3" # python 3.10.12
2627
- "ghcr.io/osgeo/gdal:ubuntu-small-3.6.4" # python 3.10.6
2728
- "osgeo/gdal:ubuntu-small-3.5.3" # python 3.8.10
@@ -38,6 +39,9 @@ jobs:
3839
- uses: actions/checkout@v4
3940

4041
- name: Create virtual environment
42+
# install uv and use it to create a virtual environment, then add it to
43+
# environment variables so that it is automatically activated and can be
44+
# used for tests below
4145
run: |
4246
curl -LsSf https://astral.sh/uv/install.sh | sh
4347
. $HOME/.cargo/env

.github/workflows/release.yml

Lines changed: 84 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -54,36 +54,60 @@ jobs:
5454
needs: [build-sdist]
5555
runs-on: ubuntu-latest
5656
container:
57-
image: "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5"
57+
image: "ghcr.io/osgeo/gdal:ubuntu-small-3.9.2"
5858

5959
steps:
60+
- name: Install packages
61+
run: |
62+
apt-get update && apt-get install -y build-essential python3-dev
63+
64+
- name: Create virtual environment
65+
# install uv and use it to create a virtual environment, then add it to
66+
# environment variables so that it is automatically activated and can be
67+
# used for tests below
68+
run: |
69+
curl -LsSf https://astral.sh/uv/install.sh | sh
70+
. $HOME/.cargo/env
71+
uv venv .venv
72+
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
73+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
74+
6075
- name: Download sdist from artifacts
6176
uses: actions/download-artifact@v4
6277
with:
6378
name: pyogrio-sdist
6479
path: wheelhouse
6580

66-
- name: Install pip
67-
run: |
68-
apt-get update && apt-get install -y python3-pip
69-
7081
- name: Build from sdist and install test dependencies
7182
shell: bash
7283
run: |
73-
python3 -m pip install --no-cache-dir wheelhouse/*.tar.gz
74-
python3 -m pip install --no-cache-dir pytest pandas pyproj shapely>=2
75-
python3 -m pip install --no-cache-dir --no-deps geopandas
76-
python3 -m pip list
84+
uv pip install --no-cache wheelhouse/*.tar.gz
85+
uv pip install pytest pandas pyproj shapely>=2
86+
uv pip install --no-deps geopandas
87+
uv pip list
7788
7889
- name: Run tests
7990
shell: bash
91+
# virtual environment is automatically activated
8092
run: |
8193
cd ..
82-
python3 -m pytest --pyargs pyogrio.tests -v
94+
uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
95+
uv run python -m pytest --pyargs pyogrio.tests -v
8396
8497
build-wheels-linux:
8598
name: Build wheels on Linux
86-
runs-on: "ubuntu-20.04"
99+
runs-on: "ubuntu-latest"
100+
strategy:
101+
fail-fast: false
102+
matrix:
103+
include:
104+
# use manylinux2014 for older glibc platforms until discontinued
105+
- wheel_name: "pyogrio-wheel-linux-manylinux2014_x86_64"
106+
container: "ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile"
107+
108+
# use manylinux_2_28 for any platforms with glibc>=2.28
109+
- wheel_name: "pyogrio-wheel-linux-manylinux_2_28_x86_64"
110+
container: "ci/manylinux_2_28_x86_64-vcpkg-gdal.Dockerfile"
87111

88112
steps:
89113
- name: Checkout
@@ -103,7 +127,7 @@ jobs:
103127
uses: docker/build-push-action@v6
104128
with:
105129
context: .
106-
file: ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile
130+
file: ${{ matrix.container }}
107131
tags: manylinux-vcpkg-gdal:latest
108132
push: false
109133
load: true
@@ -117,7 +141,7 @@ jobs:
117141

118142
- uses: actions/upload-artifact@v4
119143
with:
120-
name: pyogrio-wheel-linux
144+
name: ${{ matrix.wheel_name }}
121145
path: ./wheelhouse/*.whl
122146
compression-level: 0
123147

@@ -129,7 +153,7 @@ jobs:
129153
matrix:
130154
include:
131155
- os: "macos-12"
132-
triplet: "x64-osx-dynamic"
156+
triplet: "x64-osx-dynamic-release"
133157
arch: x86_64
134158
vcpkg_cache: "/Users/runner/.cache/vcpkg/archives"
135159
vcpkg_logs: "/usr/local/share/vcpkg/buildtrees/**/*.log"
@@ -160,7 +184,7 @@ jobs:
160184
path: |
161185
${{ matrix.vcpkg_cache }}
162186
# bump the last digit to avoid using previous build cache
163-
key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.8.5-cache0
187+
key: ${{ matrix.os }}-${{ matrix.arch }}-vcpkg-gdal3.9.2-cache0
164188

165189
# MacOS build requires aclocal, which is part of automake, but appears
166190
# to be missing in default image
@@ -176,9 +200,9 @@ jobs:
176200
cd $VCPKG_INSTALLATION_ROOT
177201
# on mac the clone is not clean, otherwise git pull fails
178202
git reset --hard
179-
# pull latest version to ensure the required commit with GDAL 3.8 is available
203+
# pull specific commit with desired GDAL version
180204
git pull
181-
git checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049
205+
git checkout 73794ce5f63fd138fab999a22959ca7c6305d93c
182206
183207
- name: Install GDAL
184208
env:
@@ -215,17 +239,28 @@ jobs:
215239
strategy:
216240
fail-fast: false
217241
matrix:
218-
os: ["ubuntu-20.04", "windows-latest", "macos-12", "macos-latest"]
242+
os:
243+
[
244+
"ubuntu-latest",
245+
"ubuntu-20.04",
246+
"windows-latest",
247+
"macos-12",
248+
"macos-latest",
249+
]
219250
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
220251
include:
252+
- os: "ubuntu-latest"
253+
artifact: pyogrio-wheel-linux-manylinux2014_x86_64
254+
- os: "ubuntu-latest"
255+
artifact: pyogrio-wheel-linux-manylinux_2_28_x86_64
221256
- os: "ubuntu-20.04"
222-
artifact: pyogrio-wheel-linux
257+
artifact: pyogrio-wheel-linux-manylinux_2_28_x86_64
223258
- os: "windows-latest"
224259
artifact: pyogrio-wheel-x64-windows-dynamic-release
225260
- os: "macos-12"
226-
artifact: pyogrio-wheel-x64-osx-dynamic
261+
artifact: pyogrio-wheel-x64-osx-dynamic-release
227262
- os: "macos-latest"
228-
artifact: pyogrio-wheel-x64-osx-dynamic
263+
artifact: pyogrio-wheel-arm64-osx-dynamic-release
229264

230265
steps:
231266
- name: Checkout
@@ -236,8 +271,27 @@ jobs:
236271
with:
237272
python-version: ${{ matrix.python-version }}
238273
allow-prereleases: true
239-
cache: "pip"
240-
cache-dependency-path: "ci/requirements-wheel-test.txt"
274+
275+
- name: Create virtual environment (Linux / MacOS)
276+
# install uv and use it to create a virtual environment, then add it to
277+
# environment variables so that it is automatically activated and can be
278+
# used for tests below
279+
if: ${{ runner.os != 'Windows' }}
280+
shell: bash
281+
run: |
282+
curl -LsSf https://astral.sh/uv/install.sh | sh
283+
. $HOME/.cargo/env
284+
uv venv .venv
285+
echo "VIRTUAL_ENV=.venv" >> $GITHUB_ENV
286+
echo "$PWD/.venv/bin" >> $GITHUB_PATH
287+
288+
- name: Create virtual environment (Windows)
289+
if: ${{ runner.os == 'Windows' }}
290+
run: |
291+
irm https://astral.sh/uv/install.ps1 | iex
292+
uv venv .venv
293+
"VIRTUAL_ENV=.venv" | Out-File -FilePath $env:GITHUB_ENV -Append
294+
"$PWD/.venv/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append
241295
242296
- name: Download wheels from artifacts
243297
uses: actions/download-artifact@v4
@@ -248,19 +302,20 @@ jobs:
248302
- name: Install dependencies and pyogrio wheel
249303
shell: bash
250304
run: |
251-
python -m pip install -r ci/requirements-wheel-test.txt
305+
uv pip install -r ci/requirements-wheel-test.txt
306+
uv pip install --no-cache --pre --no-index --find-links wheelhouse pyogrio
252307
if [ ${{ matrix.python-version }} != "3.12" ]; then
253-
python -m pip install --no-deps geopandas
308+
uv pip install --no-deps geopandas
254309
fi
255-
python -m pip install --pre --find-links wheelhouse pyogrio
256-
python -m pip list
310+
uv pip list
257311
258312
- name: Run tests
259313
shell: bash
314+
# virtual environment is automatically activated
260315
run: |
261316
cd ..
262-
python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
263-
python -m pytest --pyargs pyogrio.tests -v
317+
uv run python -c "import pyogrio; print(f'GDAL version: {pyogrio.__gdal_version__}\nGEOS version: {pyogrio.__gdal_geos_version__}')"
318+
uv run python -m pytest --pyargs pyogrio.tests -v
264319
265320
publish:
266321
name: Publish pyogrio to GitHub / PyPI

CHANGES.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# CHANGELOG
22

3-
## 0.9.1 (yyyy-mm-dd)
3+
## 0.10.0 (yyyy-mm-dd)
4+
5+
### Bug fixes
6+
7+
- Silence warning from `write_dataframe` with `GeoSeries.notna()` (#435).
8+
- Enable mask & bbox filter when geometry column not read (#431).
9+
- Raise NotImplmentedError when user attempts to write to an open file handle (#442).
10+
- Prevent seek on read from compressed inputs (#443).
411

512
### Packaging
613

@@ -10,13 +17,7 @@
1017
packages if needed: more info [here](https://gdal.org/download.html#conda).
1118
This also leads to `pyproj` becoming an optional dependency; you will need
1219
to install `pyproj` in order to support spatial reference systems (#452).
13-
14-
### Bug fixes
15-
16-
- Silence warning from `write_dataframe` with `GeoSeries.notna()` (#435).
17-
- Enable mask & bbox filter when geometry column not read (#431).
18-
- Raise NotImplmentedError when user attempts to write to an open file handle (#442).
19-
- Prevent seek on read from compressed inputs (#443).
20+
- The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.2 (#466).
2021

2122
## 0.9.0 (2024-06-17)
2223

File renamed without changes.
File renamed without changes.

ci/manylinux2014_x86_64-vcpkg-gdal.Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ FROM quay.io/pypa/manylinux2014_x86_64:2024-08-12-7fde9b1
33
# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988)
44
RUN yum install -y curl unzip zip tar perl-IPC-Cmd
55

6-
# require python >= 3.7 (python 3.6 is default on base image) for meson
6+
# require python >= 3.7 (python 3.6 is default on base image) for meson
77
RUN ln -s /opt/python/cp38-cp38/bin/python3 /usr/bin/python3
88

99
RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \
10-
git -C /opt/vcpkg checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049
10+
git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c
1111

1212
ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
1313
ENV PATH="${PATH}:/opt/vcpkg"
1414

15-
ENV VCPKG_DEFAULT_TRIPLET="x64-linux-dynamic"
15+
ENV VCPKG_DEFAULT_TRIPLET="x64-linux-dynamic-release"
1616

1717
# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786
1818
RUN bootstrap-vcpkg.sh && \
@@ -21,11 +21,11 @@ RUN bootstrap-vcpkg.sh && \
2121
vcpkg integrate install && \
2222
vcpkg integrate bash
2323

24-
COPY ci/custom-triplets/x64-linux-dynamic.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic.cmake
24+
COPY ci/custom-triplets/x64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic-release.cmake
2525
COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/
2626
COPY ci/vcpkg.json opt/vcpkg/
2727

28-
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic/lib"
28+
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic-release/lib"
2929
RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \
3030
--overlay-ports=opt/vcpkg/custom-ports \
3131
--feature-flags="versions,manifests" \

ci/manylinux_2_28_aarch64-vcpkg-gdal.Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM quay.io/pypa/manylinux_2_28_aarch64:2024-08-12-7fde9b1
44
RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd
55

66
RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \
7-
git -C /opt/vcpkg checkout 4f4a1821b2e8c7a2863e4df65a4d514f84144049
7+
git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c
88

99
ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
1010
ENV PATH="${PATH}:/opt/vcpkg"
@@ -24,7 +24,6 @@ RUN bootstrap-vcpkg.sh && \
2424
vcpkg integrate bash
2525

2626
COPY ci/custom-triplets/arm64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/arm64-linux-dynamic-release.cmake
27-
COPY ci/vcpkg-custom-ports/ opt/vcpkg/custom-ports/
2827
COPY ci/vcpkg.json opt/vcpkg/
2928

3029
# temporary workaround for https://github.com/microsoft/vcpkg/issues/36094
@@ -33,7 +32,6 @@ RUN git -C /opt/vcpkg apply vcpkg_linux_crosscompiling.patch
3332

3433
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/arm64-linux-dynamic-release/lib"
3534
RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \
36-
--overlay-ports=opt/vcpkg/custom-ports \
3735
--feature-flags="versions,manifests" \
3836
--x-manifest-root=opt/vcpkg \
3937
--x-install-root=opt/vcpkg/installed && \
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
FROM quay.io/pypa/manylinux_2_28_x86_64:2024-08-12-7fde9b1
2+
3+
# building openssl needs IPC-Cmd (https://github.com/microsoft/vcpkg/issues/24988)
4+
RUN dnf -y install curl zip unzip tar ninja-build perl-IPC-Cmd
5+
6+
RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg && \
7+
git -C /opt/vcpkg checkout 73794ce5f63fd138fab999a22959ca7c6305d93c
8+
9+
ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
10+
ENV PATH="${PATH}:/opt/vcpkg"
11+
12+
ENV VCPKG_DEFAULT_TRIPLET="x64-linux-dynamic-release"
13+
14+
# mkdir & touch -> workaround for https://github.com/microsoft/vcpkg/issues/27786
15+
RUN bootstrap-vcpkg.sh && \
16+
mkdir -p /root/.vcpkg/ $HOME/.vcpkg && \
17+
touch /root/.vcpkg/vcpkg.path.txt $HOME/.vcpkg/vcpkg.path.txt && \
18+
vcpkg integrate install && \
19+
vcpkg integrate bash
20+
21+
COPY ci/custom-triplets/x64-linux-dynamic-release.cmake opt/vcpkg/custom-triplets/x64-linux-dynamic-release.cmake
22+
COPY ci/vcpkg.json opt/vcpkg/
23+
24+
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/opt/vcpkg/installed/x64-linux-dynamic-release/lib"
25+
RUN vcpkg install --overlay-triplets=opt/vcpkg/custom-triplets \
26+
--feature-flags="versions,manifests" \
27+
--x-manifest-root=opt/vcpkg \
28+
--x-install-root=opt/vcpkg/installed && \
29+
vcpkg list
30+
31+
# setting git safe directory is required for properly building wheels when
32+
# git >= 2.35.3
33+
RUN git config --global --add safe.directory "*"

ci/vcpkg.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "pyogrio",
3-
"version": "0.8.0",
3+
"version": "0.10.0",
44
"dependencies": [
55
{
66
"name": "gdal",
77
"default-features": false,
88
"features": ["recommended-features", "curl", "geos", "iconv"]
99
}
1010
],
11-
"builtin-baseline": "4f4a1821b2e8c7a2863e4df65a4d514f84144049"
11+
"builtin-baseline": "73794ce5f63fd138fab999a22959ca7c6305d93c"
1212
}

0 commit comments

Comments
 (0)