Skip to content

Commit 35996b9

Browse files
committed
install geos depending on OS
1 parent 924c5cb commit 35996b9

File tree

1 file changed

+25
-19
lines changed

1 file changed

+25
-19
lines changed

.github/workflows/build.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,25 +43,31 @@ jobs:
4343
- name: Build wheels
4444
env:
4545
CIBW_SKIP: "pp* *-musllinux*" # Skip PyPy and musllinux
46-
CIBW_BEFORE_ALL: >
47-
sudo apt-get install software-properties-common
48-
sudo add-apt-repository ppa:ubuntugis/ppa
49-
sudo apt-get install geos
50-
yum install -y geos-devel ||
51-
apt-get update && apt-get install -y libgeos-dev ||
52-
brew install geos
53-
CIBW_BEFORE_BUILD: >
54-
pip install --upgrade pip &&
55-
pip install numpy>=1.21.4 cython>=0.29.21 &&
56-
python -c "import utils; utils.GeosLibrary('3.6.5').build('extern', njobs=16)"
57-
CIBW_ENVIRONMENT: >
58-
GEOS_DIR=/project/packages/basemap/extern
59-
SETUPTOOLS_USE_DISTUTILS=stdlib
60-
CIBW_TEST_COMMAND: >
61-
cd {project} && python -m pytest --cov="mpl_toolkits.basemap"
62-
--cov-report=term --ignore=dist --ignore=build
63-
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
64-
46+
# Linux setup
47+
CIBW_BEFORE_ALL_LINUX: >
48+
sudo apt-get update &&
49+
sudo apt-get install -y software-properties-common &&
50+
sudo add-apt-repository ppa:ubuntugis/ppa &&
51+
sudo apt-get update &&
52+
sudo apt-get install -y libgeos-dev
53+
# Windows setup
54+
CIBW_BEFORE_ALL_WINDOWS: >
55+
choco install geos
56+
# macOS setup
57+
CIBW_BEFORE_ALL_MACOS: >
58+
brew install geos
59+
60+
CIBW_BEFORE_BUILD: >
61+
pip install --upgrade pip &&
62+
pip install numpy>=1.21.4 cython>=0.29.21 &&
63+
python -c "import utils; utils.GeosLibrary('3.6.5').build('extern', njobs=16)"
64+
CIBW_ENVIRONMENT: >
65+
GEOS_DIR=/project/packages/basemap/extern
66+
SETUPTOOLS_USE_DISTUTILS=stdlib
67+
CIBW_TEST_COMMAND: >
68+
cd {project} && python -m pytest --cov="mpl_toolkits.basemap"
69+
--cov-report=term --ignore=dist --ignore=build
70+
CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-*"
6571
run: |
6672
cd ${{ env.PKGDIR }}
6773
python -m cibuildwheel --output-dir wheelhouse

0 commit comments

Comments
 (0)