From 68c501d3a45a94b77bda69919769baf59e5060c0 Mon Sep 17 00:00:00 2001 From: tpeulen Date: Sat, 25 Jan 2025 14:05:35 +0100 Subject: [PATCH 1/4] Downgrade VS --- conda-recipe/bld.bat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conda-recipe/bld.bat b/conda-recipe/bld.bat index e37f2025..4f224183 100755 --- a/conda-recipe/bld.bat +++ b/conda-recipe/bld.bat @@ -17,7 +17,7 @@ git pull cd ..\..\ :: Configure the build using CMake -cmake -S . -B build -G "Visual Studio 17 2022" -A x64 ^ +cmake -S . -B build -G "Visual Studio 15 2017" -A x64 ^ -DPYTHON_EXECUTABLE="%PYTHON%" ^ -DPYTHON_LIBRARY_OUTPUT_DIRECTORY="%SP_DIR%" ^ -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE="%SP_DIR%" ^ @@ -42,7 +42,7 @@ if exist build rmdir /s /q build mkdir build cd build :: Configure the build using CMake -cmake .. -G "Visual Studio 17 2022" ^ +cmake .. -G "Visual Studio 15 2017" -A x64 ^ -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ -DCMAKE_PREFIX_PATH="%PREFIX%" ^ -DBUILD_PYTHON_INTERFACE=ON ^ @@ -71,7 +71,7 @@ for /f "tokens=2 delims= " %%v in ('%PYTHON% --version 2^>^&1') do set PYTHON_VE :: Extract only the numeric part of the version for /f "tokens=1-3 delims=." %%a in ("%PYTHON_VERSION%") do set PYTHON_VERSION_NUMERIC=%%a.%%b.%%c -cmake .. -G "Visual Studio 17 2022" ^ +cmake .. -G "Visual Studio 15 2017" -A x64 ^ -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^ -DCMAKE_PREFIX_PATH="%PREFIX%" ^ -DBUILD_PYTHON_INTERFACE=ON ^ From 9d23ade79bd56c644a63da6fae9857e1caaf9c15 Mon Sep 17 00:00:00 2001 From: tpeulen Date: Sat, 25 Jan 2025 14:05:48 +0100 Subject: [PATCH 2/4] Pin python version --- conda-recipe/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 0d089644..f128def8 100755 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -32,7 +32,7 @@ requirements: - libgomp # [linux] - pip - swig <4.3.0 - - python + - python =3.10 - numpy - tttrlib - pkg-config # [not win] From d2a9b91af9dd2ea7a117311c342d5324ab46b2e2 Mon Sep 17 00:00:00 2001 From: tpeulen Date: Sat, 25 Jan 2025 14:06:15 +0100 Subject: [PATCH 3/4] Build windows --- .github/workflows/conda-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index c9b01705..da4e01b8 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -18,7 +18,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest"] #, "windows-latest"] # "macos-latest"] #, + os: ["ubuntu-latest", "windows-latest"] # "macos-latest"] #, python-version: ["3.10"] steps: - name: Checkout Repository From 7faa5d018c27726d5104c999154e44e2c63b1f7c Mon Sep 17 00:00:00 2001 From: tpeulen Date: Sat, 25 Jan 2025 14:28:14 +0100 Subject: [PATCH 4/4] Install vs2017 --- .github/workflows/conda-build.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index da4e01b8..afa2c855 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -12,7 +12,7 @@ on: - cron: "0 11 * * 1" jobs: - build-linux: + build: name: CondaBuild (${{ matrix.python-version }}, ${{ matrix.os }}) runs-on: ${{ matrix.os }} strategy: @@ -28,6 +28,13 @@ jobs: if: startsWith(matrix.os, 'macos') run: build_tools/install_macos_sdk.sh + - name: Install Visual Studio 2017 (Windows only) + if: matrix.os == 'windows-latest' + run: | + choco install visualstudio2017buildtools --version=15.9.54 -y + choco install visualstudio2017-workload-vctools -y + setx PATH "%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build" + - name: Set up Conda uses: conda-incubator/setup-miniconda@v3 with: @@ -37,6 +44,8 @@ jobs: channels: conda-forge,bioconda,tpeulen,defaults channel-priority: true + + - name: Display Conda Settings shell: bash -el {0} run: |