@@ -45,19 +45,10 @@ jobs:
4545 sudo apt-get update
4646 sudo apt-get install -y build-essential
4747
48- - name : Setup C++ toolchain (Windows)
49- if : runner.os == 'Windows'
50- uses : microsoft/setup-msbuild@v1.1
51-
5248 - name : Setup Visual Studio Developer Command Prompt
5349 if : runner.os == 'Windows'
5450 uses : ilammy/msvc-dev-cmd@v1
5551
56- - name : Install Windows development tools
57- if : runner.os == 'Windows'
58- run : |
59- choco install visualstudio2019buildtools visualstudio2019-workload-vctools cmake
60-
6152 - name : Setup C++ toolchain (macOS)
6253 if : runner.os == 'macOS'
6354 run : |
@@ -66,17 +57,25 @@ jobs:
6657 - name : Install cibuildwheel
6758 run : python -m pip install cibuildwheel==2.16.2
6859
60+ - name : Set GEO_SRC_DIR
61+ shell : bash
62+ run : |
63+ if [ "$RUNNER_OS" == "Windows" ]; then
64+ echo "GEO_SRC_DIR=${{ github.workspace }}/geo" >> $GITHUB_ENV
65+ else
66+ echo "GEO_SRC_DIR=/project/geo" >> $GITHUB_ENV
67+ fi
68+
6969 - name : Build wheels
7070 env :
7171 CIBW_BUILD : " cp{39,310,311,312}-{manylinux_x86_64,win_amd64,macosx_x86_64}"
7272 CIWB_SKIP : " *-manylinux_i686 *-musllinux* pp*"
7373 CIBW_BEFORE_BUILD : >
74- python -c "import utils; utils.GeosLibrary('${{ env.GEO_VERSION }}').build('extern ', njobs=16)"
74+ python -c "import utils; utils.GeosLibrary('${{ env.GEO_VERSION }}').build('geo ', njobs=16)"
7575 CIBW_ENVIRONMENT : >
76- GEOS_DIR=${{ runner.os == 'Windows' && 'D:/a/basemap/basemap/packages/basemap/extern/' || '/project/extern' }}
77- CFLAGS=-I${{ runner.os == 'Windows' && 'D:/a/basemap/basemap/packages/basemap/extern/include' || '/project/extern/include' }}
78- LDFLAGS=-L${{ runner.os == 'Windows' && 'D:/a/basemap/basemap/packages/basemap/extern/lib' || '/project/extern/lib' }}
79-
76+ GEOS_DIR=${{ GEO_SRC_DIR }}
77+ CFLAGS=-I${{ GEO_SRC_DIR }}/include
78+ LDFLAGS=-L${{ GEO_SRC_DIR }}/lib
8079 CIBW_TEST_COMMAND : >
8180 cd {project}
8281 pip install pytest
0 commit comments