@@ -268,6 +268,7 @@ jobs:
268268 runs-on : ${{ matrix.platform }}
269269
270270 strategy :
271+ fail-fast : false
271272 matrix :
272273 compiler : [gcc-old, clang-old, gcc, clang, macos-intel, macos-arm]
273274 include :
@@ -317,47 +318,60 @@ jobs:
317318 steps :
318319 - uses : actions/checkout@v4
319320
320- - name : Install prerequisites
321+ - name : Clean up build environment
321322 run : |
322323 # Workaround for github/brew problem. Python is already install
323324 # on the Github action runner and then homebrew comes along...
324325 # See also: https://github.com/Homebrew/homebrew-core/issues/173191
325326 rm -f /usr/local/bin/2to3* /usr/local/bin/idle3* /usr/local/bin/pydoc3* /usr/local/bin/python3*
326327 if : ${{ matrix.flavour == 'macos' }}
327328
328- - uses : ./.github/actions/install-dependencies
329- with :
330- version : ${{ matrix.deps }}
331-
332- - uses : actions/setup-python@v5
333- with :
334- python-version : " ${{ matrix.python }}"
335- allow-prereleases : true
336-
337329 - name : Install packages
338330 run : |
339331 sudo apt-get update -y -qq
340- sudo apt-get install -y -qq libboost-dev libexpat1-dev zlib1g-dev libbz2-dev libproj-dev libgeos-dev liblz4-dev
332+ sudo apt-get install -y -qq libboost-dev libexpat1-dev zlib1g-dev libbz2-dev libproj-dev libgeos-dev liblz4-dev virtualenv
341333 if : ${{ matrix.flavour == 'linux' }}
342334
343335 - name : Install packages
344- run : brew install boost geos
336+ run : brew install boost geos virtualenv
345337 shell : bash
346338 if : ${{ matrix.flavour == 'macos' }}
347339
348- - name : Install prerequisites
340+ - name : Setup virtualenv
349341 run : |
350- python -m pip install --upgrade pip
351- pip install -U pytest pytest-httpserver shapely setuptools requests
342+ virtualenv venv
343+ ./venv/bin/pip install build
344+
345+ - name : Install package dependencies (develop)
346+ run : |
347+ git clone --quiet --depth 1 https://github.com/osmcode/libosmium.git contrib/libosmium
348+ git clone --quiet --depth 1 https://github.com/mapbox/protozero.git contrib/protozero
349+ git clone --quiet https://github.com/pybind/pybind11.git contrib/pybind11
352350 shell : bash
351+ if : ${{ matrix.deps == 'develop' }}
352+
353+ - name : Install package dependencies (release)
354+ run : |
355+ ./venv/bin/python -m build --sdist
356+ shell : bash
357+ if : ${{ matrix.deps == 'release' }}
358+
359+ - uses : actions/setup-python@v5
360+ with :
361+ python-version : " ${{ matrix.python }}"
362+ allow-prereleases : true
353363
354364 - name : Build package
355- run : python setup.py build
365+ run : |
366+ ./venv/bin/python -m build -w
356367 shell : bash
357368
358369 - name : Run tests
359370 run : |
360- pytest test
371+ WHEEL=`ls dist/osmium*.whl`
372+ echo "Installing $WHEEL"
373+ ./venv/bin/pip install dist/osmium*whl ${WHEEL}[tests]
374+ ./venv/bin/pytest test
361375 shell : bash
362376
363377
@@ -476,11 +490,16 @@ jobs:
476490 env :
477491 CMAKE_TOOLCHAIN_FILE : C:/vcpkg/scripts/buildsystems/vcpkg.cmake
478492
493+ - name : Repair wheels
494+ run : |
495+ pip install delvewheel
496+ delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin/ --add-path C:/vcpkg/installed/x64-windows/debug/bin dist/*.whl
497+
479498 - name : ' Upload Artifact'
480499 uses : actions/upload-artifact@v4
481500 with :
482501 name : pyosmium-win64-dist
483- path : dist
502+ path : wheelhouse
484503
485504 build-windows-free-threaded :
486505 runs-on : windows-2022
@@ -502,7 +521,8 @@ jobs:
502521 shell : bash
503522
504523 - name : Install packages
505- run : vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows boost-variant:x64-windows boost-iterator:x64-windows lz4:x86-windows
524+ run : |
525+ vcpkg install bzip2:x64-windows expat:x64-windows zlib:x64-windows boost-variant:x64-windows boost-iterator:x64-windows lz4:x86-windows
506526 shell : bash
507527
508528 - name : Set up Python 3.13t
@@ -532,11 +552,16 @@ jobs:
532552 env :
533553 CMAKE_TOOLCHAIN_FILE : C:/vcpkg/scripts/buildsystems/vcpkg.cmake
534554
555+ - name : Repair wheels
556+ run : |
557+ pip install delvewheel
558+ delvewheel repair --add-path C:/vcpkg/installed/x64-windows/bin/ --add-path C:/vcpkg/installed/x64-windows/debug/bin dist/*.whl
559+
535560 - name : ' Upload Artifact'
536561 uses : actions/upload-artifact@v4
537562 with :
538563 name : pyosmium-win64-dist-t
539- path : dist
564+ path : wheelhouse
540565
541566
542567 test-windows :
@@ -599,7 +624,7 @@ jobs:
599624
600625 test-windows-free-threaded :
601626 runs-on : windows-2022
602- needs : build-windows
627+ needs : build-windows-free-threaded
603628
604629 strategy :
605630 fail-fast : false
@@ -646,7 +671,8 @@ jobs:
646671 if : matrix.python-version == '3.14t'
647672
648673 - name : Run tests
649- run : ./osmium-test/Scripts/pytest test --parallel-threads 5 --iterations 5
674+ run : |
675+ ./osmium-test/Scripts/pytest test --parallel-threads 5 --iterations 5
650676 shell : bash
651677
652678 - name : Check tool availability
0 commit comments