From b251f645f8933676b71a05e8db3d2fe3881f9dc0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 18 Jun 2024 18:03:53 +0200 Subject: [PATCH 01/21] Use Numpy 2.0 --- .github/workflows/debug-linux.yml | 2 +- .github/workflows/debug-macos.yml | 2 +- .github/workflows/tests.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/debug-linux.yml b/.github/workflows/debug-linux.yml index 62268a50c..a93ff5489 100644 --- a/.github/workflows/debug-linux.yml +++ b/.github/workflows/debug-linux.yml @@ -18,7 +18,7 @@ jobs: - name: Install Zfpy Dependencies run: | python -m pip install cython - python -m pip install oldest-supported-numpy + python -m pip install "numpy>=2.0" python -m pip install setuptools - name: Install OpenMP diff --git a/.github/workflows/debug-macos.yml b/.github/workflows/debug-macos.yml index 36fbb976f..cd7bab22c 100644 --- a/.github/workflows/debug-macos.yml +++ b/.github/workflows/debug-macos.yml @@ -18,7 +18,7 @@ jobs: - name: Install Zfpy Dependencies run: | python -m pip install cython - python -m pip install oldest-supported-numpy + python -m pip install "numpy>=2.0" python -m pip install setuptools - name: Install OpenMP diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 51c56e9a7..807f5ca68 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: - name: Install zfpy dependencies run: | python -m pip install cython - python -m pip install oldest-supported-numpy + python -m pip install "numpy>=2.0" python -m pip install setuptools - name: Setup OpenMP (Linux) From 859ca72af0876b9eb37d50b6d16524aa155015de Mon Sep 17 00:00:00 2001 From: jaimergp Date: Tue, 18 Jun 2024 18:44:50 +0200 Subject: [PATCH 02/21] update this requirement too --- python/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/requirements.txt b/python/requirements.txt index 849962b23..3a6f251c9 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,2 +1,2 @@ cython>=0.22 -numpy>=1.8.0 +numpy>=2.0 From 2fb939dcba0660b0e953ceef7694ddcadda70ad4 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Wed, 19 Jun 2024 10:27:46 +0200 Subject: [PATCH 03/21] Ask for py39 --- appveyor.yml | 8 ++++---- python/CMakeLists.txt | 2 +- setup.py | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8a1e4688b..8547f63f6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,26 +8,26 @@ environment: APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 PLATFORM: x64 BUILD_TYPE: Release - PYTHON_VERSION: 38 + PYTHON_VERSION: 39 - COMPILER: msvc GENERATOR: Visual Studio 15 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 PLATFORM: Win32 BUILD_TYPE: Release - PYTHON_VERSION: 38 + PYTHON_VERSION: 39 - COMPILER: msvc GENERATOR: Visual Studio 14 2015 Win64 PLATFORM: x64 BUILD_TYPE: Release - PYTHON_VERSION: 38 + PYTHON_VERSION: 39 - COMPILER: msvc GENERATOR: Visual Studio 14 2015 PLATFORM: Win32 BUILD_TYPE: Release - PYTHON_VERSION: 38 + PYTHON_VERSION: 39 - COMPILER: mingw GENERATOR: MinGW Makefiles diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index 9410ddd7f..edc84fba9 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(PythonInterp REQUIRED) find_package(PythonLibs REQUIRED) find_package(PythonExtensions REQUIRED) find_package(Cython 0.28 REQUIRED) # >= v0.28 required for const memoryview support -find_package(NumPy REQUIRED) +find_package(NumPy 2.0 REQUIRED) include_directories(${ZFP_SOURCE_DIR}/include) include_directories(${NumPy_INCLUDE_DIR}) diff --git a/setup.py b/setup.py index fa2da6efc..1651ed6ff 100644 --- a/setup.py +++ b/setup.py @@ -8,6 +8,7 @@ author_email="zfp@llnl.gov", url="https://zfp.llnl.gov", description="zfp compression in Python", + python_requires=">=3.9", long_description="zfp is a compressed format for representing multidimensional floating-point and integer arrays. zfp provides compressed-array classes that support high throughput read and write random access to individual array elements. zfp also supports serial and parallel compression of whole arrays using both lossless and lossy compression with error tolerances. zfp is primarily written in C and C++ but also includes Python and Fortran bindings.", ext_modules=[Extension("zfpy", ["build/python/zfpy.c"], include_dirs=["include", np.get_include()], From d3ba03094bd134629e76afae8cc824e125923a1d Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 1 Jul 2024 10:24:37 +0200 Subject: [PATCH 04/21] Add PR triggers for workflows, and control for concurrency --- .github/workflows/tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 807f5ca68..536ad41b9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,14 @@ name: Tests -on: push +on: + push: + branches: + - develop + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true env: BUILD_TYPE: Release From a3e75dc4e5b459c1f1865a56326207301f87db10 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 10:56:04 +0200 Subject: [PATCH 05/21] All pushes trigger workflows --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 536ad41b9..382960de3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,8 +2,8 @@ name: Tests on: push: - branches: - - develop + # branches: + # - develop pull_request: concurrency: From 14f6c99aed44501f218f5e78f30f33d612672cac Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 11:22:08 +0200 Subject: [PATCH 06/21] Force Python3 in Appveyor? --- appveyor.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8547f63f6..7f8354ce9 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -55,13 +55,13 @@ install: } # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH% - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install virtualenv + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m pip install virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set VIRTUALENV_NAME=pyVirtualEnv - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" virtualenv %VIRTUALENV_NAME% + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m virtualenv %VIRTUALENV_NAME% - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" "%VIRTUALENV_NAME%\\Scripts\\activate.bat" - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip install -r python\requirements.txt - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python --version + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m pip install -r python\requirements.txt + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 --version build_script: From 5d92985e5230eff244ff4b89d97d65f0760d28d0 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 11:25:27 +0200 Subject: [PATCH 07/21] enable interactive debugging temporarily --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 7f8354ce9..dcf7a915d 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,4 +67,4 @@ install: build_script: - sh appveyor.sh # uncomment to enable interactive remote desktop mode - #- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From 2af8987df40a685fda1ec02ebaff0ce796f01440 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 11:44:14 +0200 Subject: [PATCH 08/21] Adjust VM images --- appveyor.yml | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dcf7a915d..9c5f178ac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,54 +5,58 @@ environment: matrix: - COMPILER: msvc GENERATOR: Visual Studio 15 2017 Win64 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: x64 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc GENERATOR: Visual Studio 15 2017 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: Win32 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 14 2015 Win64 + GENERATOR: Visual Studio 14 2019 Win64 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PLATFORM: x64 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 14 2015 + GENERATOR: Visual Studio 14 2019 + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PLATFORM: Win32 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: mingw GENERATOR: MinGW Makefiles + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015 PLATFORM: Win32 BUILD_TYPE: Release + PYTHON_VERSION: 39 - COMPILER: mingw-w64 GENERATOR: MinGW Makefiles + APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: x64 BUILD_TYPE: Release + PYTHON_VERSION: 39 install: - if "%COMPILER%"=="mingw" set PATH=C:\MinGW\bin;%PATH% - if "%COMPILER%"=="mingw-w64" set PATH=C:\MinGW\bin;%PATH% # set env vars for Python system dir (assumed to always be MSVC) - - ps: | - if ($env:PYTHON_VERSION) { - $env:PYTHON_DIR = "C:\Python$env:PYTHON_VERSION" - if ($env:PLATFORM -eq "x64") { - $env:PYTHON_DIR = "$env:PYTHON_DIR-x64" - } - - $env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib" - } + - if "%PYTHON_VERSION%" != "" ( + set "PYTHON_DIR=C:\Python%PYTHON_VERSION%" + if "%PLATFORM%" == "x64" ( + set "PYTHON_DIR=%PYTHON_DIR%-x64" + ) + set "PYTHON_LIB_PATH=%PYTHON_DIR%\libs\python%PYTHON_VERSION%.lib" + ) # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" @@ -67,4 +71,4 @@ install: build_script: - sh appveyor.sh # uncomment to enable interactive remote desktop mode - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From b03dc389f0f3b9b28715129b1c2eeab3112bfca6 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 11:45:21 +0200 Subject: [PATCH 09/21] exit if PYTHON_DIR does not exist --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 9c5f178ac..6bc01130a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -57,7 +57,7 @@ install: ) set "PYTHON_LIB_PATH=%PYTHON_DIR%\libs\python%PYTHON_VERSION%.lib" ) - + - if "%PYTHON_DIR%" != "" if not exists "%PYTHON_DIR%" exit 1 # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m pip install virtualenv From b2daf40ec0f13b5b57bb669e6b96acab9e102880 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 12:10:45 +0200 Subject: [PATCH 10/21] python3 doesn't exist; use pip3 --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 6bc01130a..1a107cea6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -60,12 +60,12 @@ install: - if "%PYTHON_DIR%" != "" if not exists "%PYTHON_DIR%" exit 1 # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m pip install virtualenv + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip3 install virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set VIRTUALENV_NAME=pyVirtualEnv - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m virtualenv %VIRTUALENV_NAME% + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" virtualenv %VIRTUALENV_NAME% - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" "%VIRTUALENV_NAME%\\Scripts\\activate.bat" - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 -m pip install -r python\requirements.txt - - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python3 --version + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip3 install -r python\requirements.txt + - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" python --version build_script: From e284c5bdeac25b9f840991ea2352f908324a1c1c Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 12:23:18 +0200 Subject: [PATCH 11/21] negate equality --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 1a107cea6..c6f5c01f5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,14 +50,14 @@ install: - if "%COMPILER%"=="mingw-w64" set PATH=C:\MinGW\bin;%PATH% # set env vars for Python system dir (assumed to always be MSVC) - - if "%PYTHON_VERSION%" != "" ( + - if not "%PYTHON_VERSION%" == "" ( set "PYTHON_DIR=C:\Python%PYTHON_VERSION%" if "%PLATFORM%" == "x64" ( set "PYTHON_DIR=%PYTHON_DIR%-x64" ) set "PYTHON_LIB_PATH=%PYTHON_DIR%\libs\python%PYTHON_VERSION%.lib" ) - - if "%PYTHON_DIR%" != "" if not exists "%PYTHON_DIR%" exit 1 + - if not "%PYTHON_DIR%" == "" if not exists "%PYTHON_DIR%" exit 1 # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip3 install virtualenv From 5974a8c32868360f71de1c8df2706c3ece3e1d84 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 12:48:55 +0200 Subject: [PATCH 12/21] revert to powershell here --- appveyor.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c6f5c01f5..34ec57a7e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -50,13 +50,16 @@ install: - if "%COMPILER%"=="mingw-w64" set PATH=C:\MinGW\bin;%PATH% # set env vars for Python system dir (assumed to always be MSVC) - - if not "%PYTHON_VERSION%" == "" ( - set "PYTHON_DIR=C:\Python%PYTHON_VERSION%" - if "%PLATFORM%" == "x64" ( - set "PYTHON_DIR=%PYTHON_DIR%-x64" - ) - set "PYTHON_LIB_PATH=%PYTHON_DIR%\libs\python%PYTHON_VERSION%.lib" - ) + - ps: | + if ($env:PYTHON_VERSION) { + $env:PYTHON_DIR = "C:\Python$env:PYTHON_VERSION" + if ($env:PLATFORM -eq "x64") { + $env:PYTHON_DIR = "$env:PYTHON_DIR-x64" + } + + $env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib" + } + - if not "%PYTHON_DIR%" == "" if not exists "%PYTHON_DIR%" exit 1 # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" From 0335986001e14f1838c9711fd2ce9502a3d04fcf Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 12:51:16 +0200 Subject: [PATCH 13/21] exists -> exist --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 34ec57a7e..b201bbdf3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -60,7 +60,7 @@ install: $env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib" } - - if not "%PYTHON_DIR%" == "" if not exists "%PYTHON_DIR%" exit 1 + - if not "%PYTHON_DIR%" == "" if not exist "%PYTHON_DIR%" exit 1 # placing these behind a conditional for some reason prevents CMake from picking up the virtualenv - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" set "PATH=%PYTHON_DIR%;%PYTHON_DIR%\Scripts;%PATH%" - if "%COMPILER%"=="msvc" if "%BUILD_TYPE%"=="Release" pip3 install virtualenv From 65fecfe0754e00d0ab925b1ac96f18417e2bc60a Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 12:59:49 +0200 Subject: [PATCH 14/21] adjust generator --- appveyor.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b201bbdf3..5cabf04a5 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,28 +4,28 @@ environment: # zfpy only build for Release builds (otherwise need debug python libs python27_d.lib) matrix: - COMPILER: msvc - GENERATOR: Visual Studio 15 2017 Win64 + GENERATOR: Visual Studio 17 2022 Win64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: x64 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 15 2017 + GENERATOR: Visual Studio 17 2022 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: Win32 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 14 2019 Win64 + GENERATOR: Visual Studio 16 2019 Win64 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PLATFORM: x64 BUILD_TYPE: Release PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 14 2019 + GENERATOR: Visual Studio 16 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PLATFORM: Win32 BUILD_TYPE: Release From cf073f1042be3113ec9c222253d24d2e3e2ae179 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 13:08:14 +0200 Subject: [PATCH 15/21] use -A instead of architecture in -G --- appveyor.sh | 4 ++-- appveyor.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/appveyor.sh b/appveyor.sh index 94ec4e330..c3d939c14 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -46,9 +46,9 @@ cd tmpBuild # (CMAKE_SH satisfies mingw builds) set +e if [ $COMPILER != "msvc" ]; then - cmake -G "$GENERATOR" "$APPVEYOR_BUILD_FOLDER/tests/ci-utils" -DCMAKE_SH=CMAKE_SH-NOTFOUND + cmake -G "$GENERATOR" -A "$PLATFORM" "$APPVEYOR_BUILD_FOLDER/tests/ci-utils" -DCMAKE_SH=CMAKE_SH-NOTFOUND else - cmake -G "$GENERATOR" "$APPVEYOR_BUILD_FOLDER/tests/ci-utils" + cmake -G "$GENERATOR" -A "$PLATFORM" "$APPVEYOR_BUILD_FOLDER/tests/ci-utils" fi if [ $? -eq 0 ]; then diff --git a/appveyor.yml b/appveyor.yml index 5cabf04a5..b53803122 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,7 +4,7 @@ environment: # zfpy only build for Release builds (otherwise need debug python libs python27_d.lib) matrix: - COMPILER: msvc - GENERATOR: Visual Studio 17 2022 Win64 + GENERATOR: Visual Studio 17 2022 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022 PLATFORM: x64 BUILD_TYPE: Release @@ -18,7 +18,7 @@ environment: PYTHON_VERSION: 39 - COMPILER: msvc - GENERATOR: Visual Studio 16 2019 Win64 + GENERATOR: Visual Studio 16 2019 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 PLATFORM: x64 BUILD_TYPE: Release From cd5d726874f8404ce5b69bbfc387f0a219c040ef Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 13:22:17 +0200 Subject: [PATCH 16/21] debug again --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index b53803122..c197d3903 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -72,6 +72,6 @@ install: build_script: - - sh appveyor.sh + - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) + # - sh appveyor.sh # uncomment to enable interactive remote desktop mode - # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From ce547a5a36e273d7ba9e7031dcd6a12ff6aead2d Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 13:45:20 +0200 Subject: [PATCH 17/21] remove PYTHON_INCLUDE_DIR workarounds --- cmake/appveyor.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/appveyor.cmake b/cmake/appveyor.cmake index 29cc79069..ee714a725 100644 --- a/cmake/appveyor.cmake +++ b/cmake/appveyor.cmake @@ -53,8 +53,8 @@ if(BUILD_ZFPY) set(CTEST_SITE "${CTEST_SITE}_zfpy$ENV{PYTHON_VERSION}") # sanitize python include dir path (ex. windows vs linux slashes) - set(PYTHON_INCLUDE_DIR "") - file(TO_CMAKE_PATH "${CTEST_SOURCE_DIRECTORY}\\$ENV{VIRTUALENV_NAME}\\Include" PYTHON_INCLUDE_DIR) + # set(PYTHON_INCLUDE_DIR "") + # file(TO_CMAKE_PATH "${CTEST_SOURCE_DIRECTORY}\\$ENV{VIRTUALENV_NAME}\\Include" PYTHON_INCLUDE_DIR) list(APPEND cfg_options -DPYTHON_INCLUDE_DIR=${PYTHON_INCLUDE_DIR} From f05d9d2718e2e913cb3113a1305e0f396ebea6f1 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Sun, 7 Jul 2024 13:45:43 +0200 Subject: [PATCH 18/21] do not debug --- appveyor.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index c197d3903..b53803122 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -72,6 +72,6 @@ install: build_script: - - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - # - sh appveyor.sh + - sh appveyor.sh # uncomment to enable interactive remote desktop mode + # - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) From 62ba300996a442a87601d524ca431047a1e9e0a8 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 8 Jul 2024 13:07:17 +0200 Subject: [PATCH 19/21] define PYTHON_INCLUDE_DIR --- appveyor.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/appveyor.yml b/appveyor.yml index b53803122..e2ee51f13 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -58,6 +58,7 @@ install: } $env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib" + $env:PYTHON_INCLUDE_DIR = "$env:PYTHON_DIR\Include" } - if not "%PYTHON_DIR%" == "" if not exist "%PYTHON_DIR%" exit 1 From 642846cdb43ac2fbadde193a099b5a28466f2270 Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 8 Jul 2024 13:11:20 +0200 Subject: [PATCH 20/21] pass PYTHON_INCLUDE_DIR --- appveyor.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.sh b/appveyor.sh index c3d939c14..e4d56233a 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -32,7 +32,7 @@ if [ $COMPILER == "msvc" ] && [ $BUILD_TYPE == "Release" ]; then exit 1 fi - BUILD_FLAGS="$BUILD_FLAGS -DBUILD_ZFPY=ON" + BUILD_FLAGS="$BUILD_FLAGS -DBUILD_ZFPY=ON -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" fi BUILD_FLAGS="$BUILD_FLAGS -DBUILD_OPENMP=OFF" From b5212a7c5f92cb403424cb8b2b92fd05e4b51c0c Mon Sep 17 00:00:00 2001 From: jaimergp Date: Mon, 8 Jul 2024 13:36:53 +0200 Subject: [PATCH 21/21] pass directly --- appveyor.sh | 4 ++-- appveyor.yml | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/appveyor.sh b/appveyor.sh index e4d56233a..06f33e05c 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -31,8 +31,8 @@ if [ $COMPILER == "msvc" ] && [ $BUILD_TYPE == "Release" ]; then if [ $ACTIVE_PY_VERSION != $PYTHON_VERSION ]; then exit 1 fi - - BUILD_FLAGS="$BUILD_FLAGS -DBUILD_ZFPY=ON -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE_DIR" + PYTHON_DIR=$(python -c 'import sys; print(sys.prefix)') + BUILD_FLAGS="$BUILD_FLAGS -DBUILD_ZFPY=ON -DPYTHON_INCLUDE_DIR=$PYTHON_DIR\\include" fi BUILD_FLAGS="$BUILD_FLAGS -DBUILD_OPENMP=OFF" diff --git a/appveyor.yml b/appveyor.yml index e2ee51f13..3677d82c3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -46,8 +46,8 @@ environment: PYTHON_VERSION: 39 install: - - if "%COMPILER%"=="mingw" set PATH=C:\MinGW\bin;%PATH% - - if "%COMPILER%"=="mingw-w64" set PATH=C:\MinGW\bin;%PATH% + - if "%COMPILER%"=="mingw" set "PATH=C:\MinGW\bin;%PATH%" + - if "%COMPILER%"=="mingw-w64" set "PATH=C:\MinGW\bin;%PATH%" # set env vars for Python system dir (assumed to always be MSVC) - ps: | @@ -56,9 +56,6 @@ install: if ($env:PLATFORM -eq "x64") { $env:PYTHON_DIR = "$env:PYTHON_DIR-x64" } - - $env:PYTHON_LIB_PATH = "$env:PYTHON_DIR\libs\python$env:PYTHON_VERSION.lib" - $env:PYTHON_INCLUDE_DIR = "$env:PYTHON_DIR\Include" } - if not "%PYTHON_DIR%" == "" if not exist "%PYTHON_DIR%" exit 1