From 73599cfec11f53807a830d93e3e6ea923fd08de9 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:47:06 +0000 Subject: [PATCH 01/91] Rename test directory --- {test => tests}/test_core.py | 0 {test => tests}/test_gridsearch.py | 0 {test => tests}/test_util.py | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename {test => tests}/test_core.py (100%) rename {test => tests}/test_gridsearch.py (100%) rename {test => tests}/test_util.py (100%) diff --git a/test/test_core.py b/tests/test_core.py similarity index 100% rename from test/test_core.py rename to tests/test_core.py diff --git a/test/test_gridsearch.py b/tests/test_gridsearch.py similarity index 100% rename from test/test_gridsearch.py rename to tests/test_gridsearch.py diff --git a/test/test_util.py b/tests/test_util.py similarity index 100% rename from test/test_util.py rename to tests/test_util.py From 0478480491c04aa3a8be38853a18a9a678991602 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:47:14 +0000 Subject: [PATCH 02/91] Reorder makefile --- Makefile | 66 +++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 459cd44..96fdc1b 100644 --- a/Makefile +++ b/Makefile @@ -17,33 +17,73 @@ help: awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m\ %s\n", $$1, $$2}' -in: inplace -inplace: +################ +# Installation # +################ + +.PHONY: inplace install + +inplace: ## Build C extensions python setup.py build_ext -i install: ## Install for the current user using the default python command python setup.py build_ext --inplace python setup.py install --user -test: venv ## Run nosetests using the default nosetests command - source $(VENV_DIR)/bin/activate && green -a -vv -f +################ +# Distribution # +################ -develop: ## Install a development version of the package needed for testing - python setup.py develop --user +.PHONY: release dist dist: ## Make Python source distribution python setup.py sdist -release: +release: ## Prepare a release python make_release.py +########### +# Testing # +########### + +.PHONY: test test_direct + +test: venv ## Run nosetests using the default nosetests command + source $(VENV_DIR)/bin/activate && green -a -vv -f ./tests + +test_direct: inplace ## Run unit tests without a virtual environment + pip install wheel && pip install . && \ + python -m unittest discover ./tests + +################# +# Documentation # +################# + docs: doc doc: venv ## Build documentation with Sphinx source $(VENV_DIR)/bin/activate && m2r README.md && mv README.rst $(DOC_DIR) source $(VENV_DIR)/bin/activate && m2r CHANGELOG.md && mv CHANGELOG.rst $(DOC_DIR) source $(VENV_DIR)/bin/activate && $(MAKE) -C $(DOC_DIR) html -clean: ## Clean build dist and egg directories left after install +####################### +# Virtual environment # +####################### + +.PHONY: venv + +venv: $(VENV_DIR)/bin/activate + +$(VENV_DIR)/bin/activate: setup.py + test -d $(VENV_DIR) || python -m venv $(VENV_DIR) + source $(VENV_DIR)/bin/activate && pip install -U numpy && \ + pip install -e .[dev] + touch $(VENV_DIR)/bin/activate + +############ +# Clean up # +############ + +clean: ## Clean up after build or dist and remove compiled code rm -rf ./dist rm -rf ./build rm -rf ./$(PACKAGE).egg-info @@ -55,13 +95,5 @@ clean: ## Clean build dist and egg directories left after install find . -type f -iname '*.pyc' -delete find . -type d -name '__pycache__' -empty -delete -cleaner: clean +cleaner: clean ## Remove Cython output too rm -f ./src/wrapper.c - -venv: $(VENV_DIR)/bin/activate - -$(VENV_DIR)/bin/activate: setup.py - test -d $(VENV_DIR) || python -m venv $(VENV_DIR) - source $(VENV_DIR)/bin/activate && pip install -U numpy && \ - pip install -e .[dev] - touch $(VENV_DIR)/bin/activate From ac03a417dd646f5af4a88aa4a032236b7885ff7b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:47:22 +0000 Subject: [PATCH 03/91] Add github action --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..cbacf76 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,30 @@ +name: build + +on: + push: + pull_request: + schedule: + - cron: 42 5 * * */14 + +jobs: + test: + name: Unit tests for Python package + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ 'ubuntu-latest', 'macos-latest' ] + py: [ '3.6', '3.7', '3.8', '3.9' ] + steps: + - name: Install Python ${{ matrix.py }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.py }} + + - name: Checkout + uses: actions/checkout@v2 + + - name: Install PyGenSVM + run: pip install -e .[test] + + - name: Run unit tests + run: make test_direct From 1747e19a33d7033691d5ba8f4d9d08a83305345a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:48:42 +0000 Subject: [PATCH 04/91] install numpy prerequisite when testing --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 96fdc1b..81a1656 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ test: venv ## Run nosetests using the default nosetests command source $(VENV_DIR)/bin/activate && green -a -vv -f ./tests test_direct: inplace ## Run unit tests without a virtual environment - pip install wheel && pip install . && \ + pip install wheel numpy && pip install . && \ python -m unittest discover ./tests ################# From a79d10fb09392b56777e35e41e452ff767b1f40c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:50:56 +0000 Subject: [PATCH 05/91] make takes care of install --- .github/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cbacf76..adaf528 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,8 +23,5 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Install PyGenSVM - run: pip install -e .[test] - - name: Run unit tests run: make test_direct From 9f28856107493e2937d33851230f5fedcc5363ae Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 11 Feb 2021 22:52:34 +0000 Subject: [PATCH 06/91] install numpy before compile --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 81a1656..6c13827 100644 --- a/Makefile +++ b/Makefile @@ -24,11 +24,11 @@ help: .PHONY: inplace install inplace: ## Build C extensions - python setup.py build_ext -i + pip install numpy && python setup.py build_ext -i install: ## Install for the current user using the default python command - python setup.py build_ext --inplace - python setup.py install --user + python setup.py build_ext --inplace && \ + python setup.py install --user ################ # Distribution # From 28ace552737f37493ae77b32abe27924f4b5bcfc Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 12 Feb 2021 12:48:54 +0000 Subject: [PATCH 07/91] install system dependencies --- .github/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index adaf528..59f5fd6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ 'ubuntu-latest', 'macos-latest' ] + os: [ 'ubuntu-latest' ] py: [ '3.6', '3.7', '3.8', '3.9' ] steps: - name: Install Python ${{ matrix.py }} @@ -20,6 +20,10 @@ jobs: with: python-version: ${{ matrix.py }} + - name: Install system dependencies + # TODO: can we use openblas? + run: sudo apt-get install libatlas-base-dev liblapack-dev liblapacke-dev + - name: Checkout uses: actions/checkout@v2 From 87c0c1755614ac9c9e31aa5e5d91cac74b40686c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 1 Aug 2021 17:45:54 +0100 Subject: [PATCH 08/91] Recursively clone submodules --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59f5fd6..54d8f2f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,8 @@ jobs: - name: Checkout uses: actions/checkout@v2 + with: + submodules: recursive - name: Run unit tests run: make test_direct From 3253bc788045a867aa8fa1325ac8a8c285899bc3 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 1 Aug 2021 17:48:36 +0100 Subject: [PATCH 09/91] Ensure we have cython when building c extension --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6c13827..e6cc341 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ help: .PHONY: inplace install inplace: ## Build C extensions - pip install numpy && python setup.py build_ext -i + pip install numpy Cython && python setup.py build_ext -i install: ## Install for the current user using the default python command python setup.py build_ext --inplace && \ From f08d7b61eac7bfdcb3a9dde55da8d798fe83bba0 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 1 Aug 2021 17:52:36 +0100 Subject: [PATCH 10/91] Fix numpy deprecation warning --- gensvm/cython_wrapper/wrapper.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gensvm/cython_wrapper/wrapper.pyx b/gensvm/cython_wrapper/wrapper.pyx index 3a85e92..b5313f6 100644 --- a/gensvm/cython_wrapper/wrapper.pyx +++ b/gensvm/cython_wrapper/wrapper.pyx @@ -170,7 +170,7 @@ def predict_kernels_wrap( n_var = Xtrain.shape[1] cdef np.ndarray[np.int_t, ndim=1, mode='c'] predictions - predictions = np.empty((n_obs_test, ), dtype=np.int) + predictions = np.empty((n_obs_test, ), dtype=int) gensvm_predict_kernels(Xtest.data, Xtrain.data, V.data, V_rows, V_cols, n_obs_train, n_obs_test, n_var, n_class, kernel_idx, gamma, coef, From de2265d7b3c3e92e99e094a9afa0dd3d25a361ee Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 1 Aug 2021 17:56:36 +0100 Subject: [PATCH 11/91] Test on macOS as well --- .github/workflows/build.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54d8f2f..49d31f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,18 +12,23 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ 'ubuntu-latest' ] - py: [ '3.6', '3.7', '3.8', '3.9' ] + os: [ 'ubuntu-latest', 'macos-latest' ] + # minimal and latest + py: [ '3.6', '3.9' ] steps: - name: Install Python ${{ matrix.py }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.py }} - - name: Install system dependencies - # TODO: can we use openblas? + - name: Install system dependencies (Linux) + if: runner.os == 'Linux' run: sudo apt-get install libatlas-base-dev liblapack-dev liblapacke-dev + - name: Install system dependencies (OSX) + if: runner.os == 'macOS' + run: brew update && brew install openblas + - name: Checkout uses: actions/checkout@v2 with: From d3536b9b1c3ba602ffdf7c87df6058786a8edb2f Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 1 Aug 2021 17:58:59 +0100 Subject: [PATCH 12/91] Skip brew update step --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49d31f3..99cb314 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,7 @@ jobs: - name: Install system dependencies (OSX) if: runner.os == 'macOS' - run: brew update && brew install openblas + run: brew install openblas - name: Checkout uses: actions/checkout@v2 From 2037b1e1d955b88ffdcf59bb9012f51d658f6e5a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 20:28:29 +0100 Subject: [PATCH 13/91] Set openblas env vars for osx --- .github/workflows/build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99cb314..f4831de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,5 +34,13 @@ jobs: with: submodules: recursive - - name: Run unit tests + - name: Run unit tests (Linux) + if: runner.os == 'Linux' + run: make test_direct + + - name: Run unit tests (OSX) + if: runner.os == 'macOS' + env: + LDFLAGS="-L/usr/local/opt/openblas/lib" + CPPFLAGS="-I/usr/local/opt/openblas/include" run: make test_direct From 1a4a32ae3bc7d91a76ae3079078bdfceadf3e57a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 20:29:49 +0100 Subject: [PATCH 14/91] set env var properly --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f4831de..260447f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,6 +41,6 @@ jobs: - name: Run unit tests (OSX) if: runner.os == 'macOS' env: - LDFLAGS="-L/usr/local/opt/openblas/lib" - CPPFLAGS="-I/usr/local/opt/openblas/include" + LDFLAGS: "-L/usr/local/opt/openblas/lib" + CPPFLAGS: "-I/usr/local/opt/openblas/include" run: make test_direct From 21cb151894ec9fff309728a747a9e3463a9ee01f Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 20:50:34 +0100 Subject: [PATCH 15/91] Attempt to build on windows --- .github/workflows/build.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 260447f..5c9bb65 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ 'ubuntu-latest', 'macos-latest' ] + os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] # minimal and latest py: [ '3.6', '3.9' ] steps: @@ -29,6 +29,10 @@ jobs: if: runner.os == 'macOS' run: brew install openblas + - name: Install system dependencies (Windows) + if: runner.os == 'Windows' + run: nuget install OpenBLAS + - name: Checkout uses: actions/checkout@v2 with: @@ -44,3 +48,9 @@ jobs: LDFLAGS: "-L/usr/local/opt/openblas/lib" CPPFLAGS: "-I/usr/local/opt/openblas/include" run: make test_direct + + - name: Run unit tests (Windows) + if: runner.os == 'Windows' + run: make test_direct + + From 58f4181e70ca2d9bea2d20e329c2eaa92007b332 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 20:53:54 +0100 Subject: [PATCH 16/91] Reduce duplicate builds --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c9bb65..d4d1527 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,7 +2,11 @@ name: build on: push: + branches: + - master pull_request: + branches: + - master schedule: - cron: 42 5 * * */14 From 5c86cfd9baa8ec1f297b471fc673b1f800059fc7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 20:54:02 +0100 Subject: [PATCH 17/91] Only build on windows for debugging --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4d1527..d2fc2da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -16,7 +16,8 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + #os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] + os: [ 'windows-latest' ] # minimal and latest py: [ '3.6', '3.9' ] steps: @@ -35,7 +36,7 @@ jobs: - name: Install system dependencies (Windows) if: runner.os == 'Windows' - run: nuget install OpenBLAS + run: nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed - name: Checkout uses: actions/checkout@v2 From 961944914c86a388b5eb2a3eeede72f0b213a26b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 21:02:23 +0100 Subject: [PATCH 18/91] Try to convey openblas install to numpy --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d2fc2da..c70c57c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,12 @@ jobs: - name: Install system dependencies (Windows) if: runner.os == 'Windows' - run: nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed + run: > + nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed + echo "[openblas]" > ~/.numpy-site.cfg + echo "libraries = openblas" > ~/.numpy-site.cfg + echo "library_dirs = /cibw/openblas/OpenBLAS/lib" > ~/.numpy-site.cfg + echo "include_dir = /cibw/openblas/OpenBLAS/include" > ~/.numpy-site.cfg - name: Checkout uses: actions/checkout@v2 From 3b5212f6e32a54c7ce1a59c6a7af992ca8069bf2 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 21:42:16 +0100 Subject: [PATCH 19/91] Use Powershell for echo --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c70c57c..d7f97d9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,10 +38,10 @@ jobs: if: runner.os == 'Windows' run: > nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed - echo "[openblas]" > ~/.numpy-site.cfg - echo "libraries = openblas" > ~/.numpy-site.cfg - echo "library_dirs = /cibw/openblas/OpenBLAS/lib" > ~/.numpy-site.cfg - echo "include_dir = /cibw/openblas/OpenBLAS/include" > ~/.numpy-site.cfg + echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + echo "library_dirs = /cibw/openblas/OpenBLAS/lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + echo "include_dir = /cibw/openblas/OpenBLAS/include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 - name: Checkout uses: actions/checkout@v2 From b47ed6cc8126e38f8ecaf2f65653ac378869138a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 21:48:46 +0100 Subject: [PATCH 20/91] Fix multiline run command --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7f97d9..c0f46fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,7 @@ jobs: - name: Install system dependencies (Windows) if: runner.os == 'Windows' - run: > + run: | nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 From 660ca32ba5b2bb17933fed2cb10f2a72d37e954a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 21:51:44 +0100 Subject: [PATCH 21/91] append to config --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c0f46fb..9ed9861 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,9 +39,9 @@ jobs: run: | nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 - echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 - echo "library_dirs = /cibw/openblas/OpenBLAS/lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 - echo "include_dir = /cibw/openblas/OpenBLAS/include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "library_dirs = /cibw/openblas/OpenBLAS/lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "include_dir = /cibw/openblas/OpenBLAS/include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - name: Checkout uses: actions/checkout@v2 From 4a84454d894f1056efd6c6c2621d0c23321a2d57 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 21:57:50 +0100 Subject: [PATCH 22/91] debugging --- .github/workflows/build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ed9861..fa7595e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -40,8 +40,9 @@ jobs: nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "library_dirs = /cibw/openblas/OpenBLAS/lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "include_dir = /cibw/openblas/OpenBLAS/include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS\\lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "include_dir = D:\\cibw\\openblas\\OpenBLAS\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + dir /s "D:\\cibw\\openblas" - name: Checkout uses: actions/checkout@v2 From f96c5f290ed5911dbc84b835114146ff8bff290e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:00:09 +0100 Subject: [PATCH 23/91] Try to use Tree --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa7595e..82004c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS\\lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append echo "include_dir = D:\\cibw\\openblas\\OpenBLAS\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - dir /s "D:\\cibw\\openblas" + Tree "D:\\cibw\\openblas" - name: Checkout uses: actions/checkout@v2 From 65e96a4c46fd3d1355f9acb7f6afef3ffb53f066 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:06:31 +0100 Subject: [PATCH 24/91] Incorporate openblas version --- .github/workflows/build.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 82004c3..2747c5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,9 @@ jobs: #os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] os: [ 'windows-latest' ] # minimal and latest - py: [ '3.6', '3.9' ] + #py: [ '3.6', '3.9' ] + py: [ '3.6' ] + openblas_version: '0.2.14.1' steps: - name: Install Python ${{ matrix.py }} uses: actions/setup-python@v2 @@ -37,11 +39,11 @@ jobs: - name: Install system dependencies (Windows) if: runner.os == 'Windows' run: | - nuget install OpenBLAS -OutputDirectory /cibw/openblas -Verbosity detailed + nuget install OpenBLAS -Version ${{ matrix.openblas_version }} -OutputDirectory /cibw/openblas -Verbosity detailed echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS\\lib" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "include_dir = D:\\cibw\\openblas\\OpenBLAS\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo "include_dir = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append Tree "D:\\cibw\\openblas" - name: Checkout From a985092bfb1d14507467d11235dfd46190b23008 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:07:27 +0100 Subject: [PATCH 25/91] make list --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2747c5f..d16d8b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: # minimal and latest #py: [ '3.6', '3.9' ] py: [ '3.6' ] - openblas_version: '0.2.14.1' + openblas_version: [ '0.2.14.1' ] steps: - name: Install Python ${{ matrix.py }} uses: actions/setup-python@v2 From 873718c7229a14c9978f24b4e5afc5c8105ed02d Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:33:22 +0100 Subject: [PATCH 26/91] attempt to enable distutils debug --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d16d8b8..317162b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,6 +64,8 @@ jobs: - name: Run unit tests (Windows) if: runner.os == 'Windows' + env: + DISTUTILS_DEBUG: 1 run: make test_direct From f794f9b429e26bd6631988a5405a2d0e3eb67fd8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:49:49 +0100 Subject: [PATCH 27/91] Update tree command --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 317162b..03d35c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -44,7 +44,7 @@ jobs: echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append echo "include_dir = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - Tree "D:\\cibw\\openblas" + TREE "D:\\cibw\\openblas" /F - name: Checkout uses: actions/checkout@v2 From 2b35a40547768b69a097684308238ac7e280c33e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:50:00 +0100 Subject: [PATCH 28/91] attempt to hack the blas libs using setup.py --- setup.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/setup.py b/setup.py index cd176dc..cf934ec 100644 --- a/setup.py +++ b/setup.py @@ -64,10 +64,10 @@ ) -def on_cibw_win(): +def on_gh_actions_windows(): return ( - os.environ.get("CIBUILDWHEEL", "0") == "1" - and os.environ.get("TRAVIS_OS_NAME", "none") == "windows" + os.environ.get("GITHUB_ACTIONS", "false") == "true" + and os.environ.get("RUNNER_OS", "none") == "Windows" ) @@ -127,14 +127,14 @@ def atlas_not_found(blas_info_): return True return False - if on_cibw_win(): + if on_gh_actions_windows(): blas_info = get_info("blas_opt", notfound_action=0) blas_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], "library_dirs": [ os.sep.join( [ - "C:", + "D:", "cibw", "openblas", "OpenBLAS.0.2.14.1", @@ -147,7 +147,7 @@ def atlas_not_found(blas_info_): "include_dirs": [ os.sep.join( [ - "C:", + "D:", "cibw", "openblas", "OpenBLAS.0.2.14.1", @@ -168,7 +168,7 @@ def atlas_not_found(blas_info_): else: cblas_libs = blas_info.pop("libraries", []) - if os.environ.get("TRAVIS_OS_NAME", "none") == "osx": + if os.environ.get("RUNNER_OS", "none") == "macOS": libdir = blas_info.get("library_dirs", []) libdir = libdir[0] if libdir else None if libdir: @@ -288,7 +288,8 @@ def configuration(): get_include(), blas_info.pop("include_dirs", []), ], - extra_compile_args=blas_info.pop("extra_compile_args", []) + ["-fcommon"], + extra_compile_args=blas_info.pop("extra_compile_args", []) + + ["-fcommon"], depends=gensvm_depends, **blas_info ) From f2258907a1eb936a4a7239204df03fdd5ea1b2b6 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:50:57 +0100 Subject: [PATCH 29/91] set distutils verbosity --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index cf934ec..826b75f 100644 --- a/setup.py +++ b/setup.py @@ -113,6 +113,9 @@ def _skl_get_blas_info(): """ from numpy.distutils.system_info import get_info + from numpy.distutils.log import set_verbosity + + set_verbosity(2) def atlas_not_found(blas_info_): def_macros = blas_info_.get("define_macros", []) From 0e4c6f6d53f951c22e0ebe0d0d404a43648858c7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:56:13 +0100 Subject: [PATCH 30/91] Try un-escaping slashes --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03d35c3..f71ec81 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,8 +42,8 @@ jobs: nuget install OpenBLAS -Version ${{ matrix.openblas_version }} -OutputDirectory /cibw/openblas -Verbosity detailed echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "library_dirs = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo "include_dir = D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\include" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo 'library_dirs = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\lib\x64' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append TREE "D:\\cibw\\openblas" /F - name: Checkout From 9d29cbd3f0de26527aae8d4676cfdd60d864e04c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 22:56:21 +0100 Subject: [PATCH 31/91] fix setup.py --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 826b75f..11e716a 100644 --- a/setup.py +++ b/setup.py @@ -200,14 +200,14 @@ def atlas_not_found(lapack_info_): return True return False - if on_cibw_win(): + if on_gh_actions_windows(): lapack_info = get_info("lapack_opt", notfound_action=0) lapack_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], "library_dirs": [ os.sep.join( [ - "C:", + "D:", "cibw", "openblas", "OpenBLAS.0.2.14.1", @@ -220,7 +220,7 @@ def atlas_not_found(lapack_info_): "include_dirs": [ os.sep.join( [ - "C:", + "D:", "cibw", "openblas", "OpenBLAS.0.2.14.1", From e8d4a68fcdd637e11c3cac9fe33b57cf7687f7df Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:12:15 +0100 Subject: [PATCH 32/91] rename libopenblas.dll.a to libopenblas.lib --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f71ec81..34b0fe5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,7 @@ jobs: echo 'library_dirs = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\lib\x64' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append TREE "D:\\cibw\\openblas" /F + Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" - name: Checkout uses: actions/checkout@v2 From c07a2b37953d905e6ba122cb9ef4f08293353441 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:12:22 +0100 Subject: [PATCH 33/91] add bitness dir --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 11e716a..c016d70 100644 --- a/setup.py +++ b/setup.py @@ -144,6 +144,7 @@ def atlas_not_found(blas_info_): "lib", "native", "lib", + "x64" ] ) ], @@ -214,6 +215,7 @@ def atlas_not_found(lapack_info_): "lib", "native", "lib", + "x64", ] ) ], From fb3aa1ad31d648ea846e193467e07deb6341cc38 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:22:33 +0100 Subject: [PATCH 34/91] disable distutils debugging --- .github/workflows/build.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 34b0fe5..695333b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,8 +65,6 @@ jobs: - name: Run unit tests (Windows) if: runner.os == 'Windows' - env: - DISTUTILS_DEBUG: 1 run: make test_direct From c1b192fab79ed140827e7dd7dcb8b3e9b5332622 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:22:40 +0100 Subject: [PATCH 35/91] run tree after rename --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 695333b..8509ca3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append TREE "D:\\cibw\\openblas" /F Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" + TREE "D:\\cibw\\openblas" /F - name: Checkout uses: actions/checkout@v2 From 8b1cf8d64090916869f6e2b58bfaa3a2f518820d Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:22:50 +0100 Subject: [PATCH 36/91] set extra compile args --- setup.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c016d70..8f49af9 100644 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import io import os +import sys from distutils.command.sdist import sdist @@ -144,7 +145,7 @@ def atlas_not_found(blas_info_): "lib", "native", "lib", - "x64" + "x64", ] ) ], @@ -283,6 +284,12 @@ def configuration(): from numpy import get_include + extra_compile_args = blas_info.pop("extra_compile_args", []) + if sys.platform == "win32": + extra_compile_args.append("/d2FH4-") + else: + extra_compile_args.append("-fcommon") + config.add_extension( "cython_wrapper.wrapper", sources=gensvm_sources, @@ -293,8 +300,7 @@ def configuration(): get_include(), blas_info.pop("include_dirs", []), ], - extra_compile_args=blas_info.pop("extra_compile_args", []) - + ["-fcommon"], + extra_compile_args=extra_compile_args, depends=gensvm_depends, **blas_info ) From 65bc52dfefd1b97bcedbe0c029cac0967548bfcd Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:31:07 +0100 Subject: [PATCH 37/91] rename other lib too --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8509ca3..00fa060 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,6 +46,7 @@ jobs: echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append TREE "D:\\cibw\\openblas" /F Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" + Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F - name: Checkout From 02205efdcaa852481217660b0f15fcd0c23122ec Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:31:21 +0100 Subject: [PATCH 38/91] try random line from the web --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 00fa060..1168203 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,6 +48,7 @@ jobs: Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F + echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg - name: Checkout uses: actions/checkout@v2 From 7643069b61dd5d458007fbdafeff3accff80c36c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:32:30 +0100 Subject: [PATCH 39/91] fix path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1168203..90b6e4d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append TREE "D:\\cibw\\openblas" /F Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" - Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x32\\libopenblas.dll.a" "libopenblas.lib" + Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg From 6a377760c0cdf74c9adc94ec133f9d879fbf212b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:36:09 +0100 Subject: [PATCH 40/91] disable flag (not using vscode now) --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 8f49af9..6f25996 100644 --- a/setup.py +++ b/setup.py @@ -286,7 +286,8 @@ def configuration(): extra_compile_args = blas_info.pop("extra_compile_args", []) if sys.platform == "win32": - extra_compile_args.append("/d2FH4-") + #extra_compile_args.append("/d2FH4-") + pass else: extra_compile_args.append("-fcommon") From 2b60756880be50d3788fe798377be75c77b79490 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:51:55 +0100 Subject: [PATCH 41/91] Let's start trying with cibuildwheel --- .github/workflows/deploy.yml | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..e1ebfbd --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,44 @@ +name: Deploy to PyPI + +on: + pull_request: + branches: + - master + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ 'windows-latest' ] + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install Python ${{ matrix.py }} + uses: actions/setup-python@v2 + with: + python-version: '3.7' + + - uses: pypa/cibuildwheel@v1.12.0 + env: + CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/test_unit/" + CIBW_TEST_EXTRAS: "dev" + CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" + #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 + #CIBW_ARCHS_LINUX: auto aarch64 + CIBW_BEFORE_ALL_WINDOWS: | + nuget install OpenBLAS -Version ${{ matrix.openblas_version }} -OutputDirectory /cibw/openblas -Verbosity detailed + echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo 'library_dirs = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\lib\x64' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + TREE "D:\\cibw\\openblas" /F + Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" + Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" + TREE "D:\\cibw\\openblas" /F + echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg From 101677a7a83c5658591d7bf569cbe2b11e62b0c5 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:52:21 +0100 Subject: [PATCH 42/91] disable the compiler change for now --- .github/workflows/build.yml | 3 ++- .github/workflows/deploy.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 90b6e4d..6290ab1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,8 @@ jobs: Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F - echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg + #echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII + #~/pydistutils.cfg - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e1ebfbd..b797f3b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -41,4 +41,5 @@ jobs: Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F - echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII ~/pydistutils.cfg + # echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII + # ~/pydistutils.cfg From dbbfbccb0e925d2ed998f96fe74b69f86dc669be Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 4 Aug 2021 23:57:06 +0100 Subject: [PATCH 43/91] set openblas version --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b797f3b..dbf90c6 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,6 +12,7 @@ jobs: strategy: matrix: os: [ 'windows-latest' ] + openblas_version: [ '0.2.14.1' ] steps: - name: Checkout From ec0a73675f92aade36a2dee657bafe4212b9ceef Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 00:00:57 +0100 Subject: [PATCH 44/91] Install numpy and cython before build --- .github/workflows/deploy.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index dbf90c6..af8f626 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -42,5 +42,4 @@ jobs: Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" TREE "D:\\cibw\\openblas" /F - # echo "[build]`ncompiler=mingw32" | Out-File -Encoding ASCII - # ~/pydistutils.cfg + CIBW_BEFORE_BUILD: "pip install numpy Cython" From 7e0e360c66561a219e2b718193311e9f09fd7b8e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 00:08:43 +0100 Subject: [PATCH 45/91] move windows build commands to script --- .github/workflows/deploy.yml | 11 +---------- build_tools/github/setup_windows.ps1 | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 build_tools/github/setup_windows.ps1 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index af8f626..0930420 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,14 +32,5 @@ jobs: CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 #CIBW_ARCHS_LINUX: auto aarch64 - CIBW_BEFORE_ALL_WINDOWS: | - nuget install OpenBLAS -Version ${{ matrix.openblas_version }} -OutputDirectory /cibw/openblas -Verbosity detailed - echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 - echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo 'library_dirs = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\lib\x64' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - echo 'include_dir = D:\cibw\openblas\OpenBLAS.${{ matrix.openblas_version }}\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append - TREE "D:\\cibw\\openblas" /F - Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" - Rename-Item "D:\\cibw\\openblas\\OpenBLAS.${{ matrix.openblas_version }}\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" - TREE "D:\\cibw\\openblas" /F + CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows CIBW_BEFORE_BUILD: "pip install numpy Cython" diff --git a/build_tools/github/setup_windows.ps1 b/build_tools/github/setup_windows.ps1 new file mode 100644 index 0000000..626c974 --- /dev/null +++ b/build_tools/github/setup_windows.ps1 @@ -0,0 +1,16 @@ + + +nuget install OpenBLAS -Version 0.2.14.1 -OutputDirectory /cibw/openblas -Verbosity detailed + +echo "[openblas]" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 + +echo "libraries = openblas" | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append +echo 'library_dirs = D:\cibw\openblas\OpenBLAS.0.2.14.1\lib\native\lib\x64' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append +echo 'include_dir = D:\cibw\openblas\OpenBLAS.0.2.14.1\lib\native\include' | Out-File -FilePath ~/.numpy-site.cfg -Encoding utf8 -Append + +TREE "D:\\cibw\\openblas" /F + +Rename-Item "D:\\cibw\\openblas\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.dll.a" "libopenblas.lib" +Rename-Item "D:\\cibw\\openblas\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.dll.a" "libopenblas.lib" + +TREE "D:\\cibw\\openblas" /F From 7cb87017c3150c1364438283fdaec1d5778424ff Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 00:11:30 +0100 Subject: [PATCH 46/91] add ps1 extension --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 0930420..965d24e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -32,5 +32,5 @@ jobs: CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 #CIBW_ARCHS_LINUX: auto aarch64 - CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows + CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows.ps1 CIBW_BEFORE_BUILD: "pip install numpy Cython" From 7ef79e251716ce764a2759c82a013acff3b99137 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 12:37:58 +0100 Subject: [PATCH 47/91] set openblas path based on bitness --- setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 6f25996..eed104f 100644 --- a/setup.py +++ b/setup.py @@ -4,6 +4,7 @@ import io import os import sys +import struct from distutils.command.sdist import sdist @@ -132,6 +133,7 @@ def atlas_not_found(blas_info_): return False if on_gh_actions_windows(): + bitness = struct.calcsize("P") * 8 blas_info = get_info("blas_opt", notfound_action=0) blas_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], @@ -145,7 +147,7 @@ def atlas_not_found(blas_info_): "lib", "native", "lib", - "x64", + "x64" if bitness == "64" else "win32", ] ) ], @@ -203,6 +205,7 @@ def atlas_not_found(lapack_info_): return False if on_gh_actions_windows(): + bitness = struct.calcsize("P") * 8 lapack_info = get_info("lapack_opt", notfound_action=0) lapack_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], @@ -216,7 +219,7 @@ def atlas_not_found(lapack_info_): "lib", "native", "lib", - "x64", + "x64" if bitness == "64" else "win32", ] ) ], @@ -286,7 +289,7 @@ def configuration(): extra_compile_args = blas_info.pop("extra_compile_args", []) if sys.platform == "win32": - #extra_compile_args.append("/d2FH4-") + # extra_compile_args.append("/d2FH4-") pass else: extra_compile_args.append("-fcommon") From b29db2a3c056dbcf93df8e4f699a32f38a207158 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 13:32:26 +0100 Subject: [PATCH 48/91] Fix test command --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 965d24e..b1edd7e 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -27,7 +27,7 @@ jobs: - uses: pypa/cibuildwheel@v1.12.0 env: - CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/test_unit/" + CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/" CIBW_TEST_EXTRAS: "dev" CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 From 13a6a4fbc0f7f17dab4cbfec0667507600f860cd Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 19:55:49 +0100 Subject: [PATCH 49/91] set compile flag again --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index eed104f..1a11a6a 100644 --- a/setup.py +++ b/setup.py @@ -289,8 +289,7 @@ def configuration(): extra_compile_args = blas_info.pop("extra_compile_args", []) if sys.platform == "win32": - # extra_compile_args.append("/d2FH4-") - pass + extra_compile_args.append("/d2FH4-") else: extra_compile_args.append("-fcommon") From 1b2457b158ccab721e24f2f5dfc0ff47189c9b35 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:21:06 +0100 Subject: [PATCH 50/91] Attempt to use scikit-learn style build scripts --- .github/workflows/deploy.yml | 18 +- build_tools/github/Windows | 15 ++ .../github/build_minimal_windows_image.sh | 31 ++++ build_tools/github/build_wheels.sh | 11 ++ build_tools/github/repair_windows_wheels.sh | 18 ++ build_tools/github/vendor.py | 155 ++++++++++++++++++ 6 files changed, 245 insertions(+), 3 deletions(-) create mode 100644 build_tools/github/Windows create mode 100644 build_tools/github/build_minimal_windows_image.sh create mode 100644 build_tools/github/build_wheels.sh create mode 100644 build_tools/github/repair_windows_wheels.sh create mode 100644 build_tools/github/vendor.py diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index b1edd7e..61d4d19 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,15 @@ jobs: strategy: matrix: os: [ 'windows-latest' ] + python: [36] openblas_version: [ '0.2.14.1' ] + include: + - os: windows-latest + bitness: 64 + platform_id: win_amd64 + - os: windows-latest + bitness: 32 + platform_id: win32 steps: - name: Checkout @@ -25,12 +33,16 @@ jobs: with: python-version: '3.7' - - uses: pypa/cibuildwheel@v1.12.0 + - name: Build and test wheels env: + CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} + CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }} + CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }} CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/" CIBW_TEST_EXTRAS: "dev" CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" - #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 - #CIBW_ARCHS_LINUX: auto aarch64 CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows.ps1 CIBW_BEFORE_BUILD: "pip install numpy Cython" + #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 + #CIBW_ARCHS_LINUX: auto aarch64 + run: bash build_tools/github/build_wheels.sh diff --git a/build_tools/github/Windows b/build_tools/github/Windows new file mode 100644 index 0000000..5ba35f7 --- /dev/null +++ b/build_tools/github/Windows @@ -0,0 +1,15 @@ +# Get the Python version of the base image from a build argument +ARG PYTHON_VERSION +FROM winamd64/python:$PYTHON_VERSION-windowsservercore + +ARG WHEEL_NAME +ARG CONFTEST_NAME +ARG CIBW_TEST_REQUIRES + +# Copy and install the Windows wheel +COPY $WHEEL_NAME $WHEEL_NAME +COPY $CONFTEST_NAME $CONFTEST_NAME +RUN pip install $env:WHEEL_NAME + +# Install the testing dependencies +RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh new file mode 100644 index 0000000..ffef89c --- /dev/null +++ b/build_tools/github/build_minimal_windows_image.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +set -e +set -x + +PYTHON_VERSION=$1 +BITNESS=$2 + +if [[ "$PYTHON_VERSION" == "36" || "$BITNESS" == "32" ]]; then + # Python 3.6 and 32-bit architectures are not supported by the + # official Docker images: Tests will just be run on the host (instead + # of the minimal Docker container) + exit 0 +fi + +TEMP_FOLDER="$HOME/AppData/Local/Temp" +WHEEL_PATH=$(ls -d $TEMP_FOLDER/*/repaired_wheel/*) +WHEEL_NAME=$(basename $WHEEL_PATH) + +cp $WHEEL_PATH $WHEEL_NAME + +# Dot the Python version for identifying the base Docker image +PYTHON_VERSION=$(echo ${PYTHON_VERSION:0:1}.${PYTHON_VERSION:1:2}) + +# Build a minimal Windows Docker image for testing the wheels +docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ + --build-arg WHEEL_NAME=$WHEEL_NAME \ + --build-arg CONFTEST_NAME=$CONFTEST_NAME \ + --build-arg CIBW_TEST_REQUIRES="$CIBW_TEST_REQUIRES" \ + -f build_tools/github/windows \ + -t gensvm/minimal-windows . diff --git a/build_tools/github/build_wheels.sh b/build_tools/github/build_wheels.sh new file mode 100644 index 0000000..8cc3455 --- /dev/null +++ b/build_tools/github/build_wheels.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +set -e +set -x + +# The version of the built dependencies are specified +# in the pyproject.toml file, while the tests are run +# against the most recent version of the dependencies + +python -m pip install cibuildwheel +python -m cibuildwheel --output-dir wheelhouse diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh new file mode 100644 index 0000000..eace457 --- /dev/null +++ b/build_tools/github/repair_windows_wheels.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# TODO: This file is adapted from scikit-learn + +set -e +set -x + +WHEEL=$1 +DEST_DIR=$2 +BITNESS=$3 + +# By default, the Windows wheels are not repaired. +# In this case, we need to vendor VCRUNTIME140.dll +wheel unpack "$WHEEL" +WHEEL_DIRNAME=$(ls -d gensvm-*) +python build_tools/github/vendor.py "$WHEEL_DIRNAME" "$BITNESS" +wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" +rm -rf "$WHEEL_DIRNAME" diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py new file mode 100644 index 0000000..3a203ba --- /dev/null +++ b/build_tools/github/vendor.py @@ -0,0 +1,155 @@ +# TODO: This file is adapted from scikit-learn + +"""Embed vcomp140.dll, vcruntime140.dll and vcruntime140_1.dll. +Note that vcruntime140_1.dll is only required (and available) +for 64-bit architectures. +""" + + +import os +import os.path as op +import shutil +import sys +import textwrap + + +TARGET_FOLDER = op.join("gensvm", ".libs") +DISTRIBUTOR_INIT = op.join("gensvm", "_distributor_init.py") +VCOMP140_SRC_PATH = "C:\\Windows\\System32\\vcomp140.dll" +VCRUNTIME140_SRC_PATH = "C:\\Windows\\System32\\vcruntime140.dll" +VCRUNTIME140_1_SRC_PATH = "C:\\Windows\\System32\\vcruntime140_1.dll" + + +def make_distributor_init_32_bits( + distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename +): + """Create a _distributor_init.py file for 32-bit architectures. + This file is imported first when importing the sklearn package + so as to pre-load the vendored vcomp140.dll and vcruntime140.dll. + """ + with open(distributor_init, "wt") as f: + f.write( + textwrap.dedent( + """ + '''Helper to preload vcomp140.dll and vcruntime140.dll to + prevent "not found" errors. + Once vcomp140.dll and vcruntime140.dll are preloaded, the + namespace is made available to any subsequent vcomp140.dll + and vcruntime140.dll. This is created as part of the scripts + that build the wheel. + ''' + import os + import os.path as op + from ctypes import WinDLL + if os.name == "nt": + # Load vcomp140.dll and vcruntime140.dll + libs_path = op.join(op.dirname(__file__), ".libs") + vcomp140_dll_filename = op.join(libs_path, "{0}") + vcruntime140_dll_filename = op.join(libs_path, "{1}") + WinDLL(op.abspath(vcomp140_dll_filename)) + WinDLL(op.abspath(vcruntime140_dll_filename)) + """.format( + vcomp140_dll_filename, vcruntime140_dll_filename + ) + ) + ) + + +def make_distributor_init_64_bits( + distributor_init, + vcomp140_dll_filename, + vcruntime140_dll_filename, + vcruntime140_1_dll_filename, +): + """Create a _distributor_init.py file for 64-bit architectures. + This file is imported first when importing the sklearn package + so as to pre-load the vendored vcomp140.dll, vcruntime140.dll + and vcruntime140_1.dll. + """ + with open(distributor_init, "wt") as f: + f.write( + textwrap.dedent( + """ + '''Helper to preload vcomp140.dll, vcruntime140.dll and + vcruntime140_1.dll to prevent "not found" errors. + Once vcomp140.dll, vcruntime140.dll and vcruntime140_1.dll are + preloaded, the namespace is made available to any subsequent + vcomp140.dll, vcruntime140.dll and vcruntime140_1.dll. This is + created as part of the scripts that build the wheel. + ''' + import os + import os.path as op + from ctypes import WinDLL + if os.name == "nt": + # Load vcomp140.dll, vcruntime140.dll and vcruntime140_1.dll + libs_path = op.join(op.dirname(__file__), ".libs") + vcomp140_dll_filename = op.join(libs_path, "{0}") + vcruntime140_dll_filename = op.join(libs_path, "{1}") + vcruntime140_1_dll_filename = op.join(libs_path, "{2}") + WinDLL(op.abspath(vcomp140_dll_filename)) + WinDLL(op.abspath(vcruntime140_dll_filename)) + WinDLL(op.abspath(vcruntime140_1_dll_filename)) + """.format( + vcomp140_dll_filename, + vcruntime140_dll_filename, + vcruntime140_1_dll_filename, + ) + ) + ) + + +def main(wheel_dirname, bitness): + """Embed vcomp140.dll, vcruntime140.dll and vcruntime140_1.dll.""" + if not op.exists(VCOMP140_SRC_PATH): + raise ValueError(f"Could not find {VCOMP140_SRC_PATH}.") + + if not op.exists(VCRUNTIME140_SRC_PATH): + raise ValueError(f"Could not find {VCRUNTIME140_SRC_PATH}.") + + if not op.exists(VCRUNTIME140_1_SRC_PATH) and bitness == "64": + raise ValueError(f"Could not find {VCRUNTIME140_1_SRC_PATH}.") + + if not op.isdir(wheel_dirname): + raise RuntimeError(f"Could not find {wheel_dirname} file.") + + vcomp140_dll_filename = op.basename(VCOMP140_SRC_PATH) + vcruntime140_dll_filename = op.basename(VCRUNTIME140_SRC_PATH) + vcruntime140_1_dll_filename = op.basename(VCRUNTIME140_1_SRC_PATH) + + target_folder = op.join(wheel_dirname, TARGET_FOLDER) + distributor_init = op.join(wheel_dirname, DISTRIBUTOR_INIT) + + # Create the "sklearn/.libs" subfolder + if not op.exists(target_folder): + os.mkdir(target_folder) + + print(f"Copying {VCOMP140_SRC_PATH} to {target_folder}.") + shutil.copy2(VCOMP140_SRC_PATH, target_folder) + + print(f"Copying {VCRUNTIME140_SRC_PATH} to {target_folder}.") + shutil.copy2(VCRUNTIME140_SRC_PATH, target_folder) + + if bitness == "64": + print(f"Copying {VCRUNTIME140_1_SRC_PATH} to {target_folder}.") + shutil.copy2(VCRUNTIME140_1_SRC_PATH, target_folder) + + # Generate the _distributor_init file in the source tree + print("Generating the '_distributor_init.py' file.") + if bitness == "32": + make_distributor_init_32_bits( + distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename + ) + else: + make_distributor_init_64_bits( + distributor_init, + vcomp140_dll_filename, + vcruntime140_dll_filename, + vcruntime140_1_dll_filename, + ) + + +if __name__ == "__main__": + _, wheel_file, bitness = sys.argv + main(wheel_file, bitness) + + © 2021 GitHub, Inc. From fcecb2c100455315a801336cf2fb28312294d3e8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:24:04 +0100 Subject: [PATCH 51/91] Remove extra text --- build_tools/github/vendor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 3a203ba..54a8958 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -151,5 +151,3 @@ def main(wheel_dirname, bitness): if __name__ == "__main__": _, wheel_file, bitness = sys.argv main(wheel_file, bitness) - - © 2021 GitHub, Inc. From fa7b6e0df74e64fb257436acdc911624f7e9d5c1 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:30:12 +0100 Subject: [PATCH 52/91] bump minimal python version --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 61d4d19..54b989c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [ 'windows-latest' ] - python: [36] + python: [37] openblas_version: [ '0.2.14.1' ] include: - os: windows-latest From 2e2893495169d7ec2da48596338c0274490c8b13 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:31:34 +0100 Subject: [PATCH 53/91] Add distributor init file --- gensvm/__init__.py | 2 ++ gensvm/_distributor_init.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 gensvm/_distributor_init.py diff --git a/gensvm/__init__.py b/gensvm/__init__.py index 5c987c2..20ee98c 100644 --- a/gensvm/__init__.py +++ b/gensvm/__init__.py @@ -4,3 +4,5 @@ from .core import GenSVM from .gridsearch import GenSVMGridSearchCV + +from . import _distributor_init diff --git a/gensvm/_distributor_init.py b/gensvm/_distributor_init.py new file mode 100644 index 0000000..218d892 --- /dev/null +++ b/gensvm/_distributor_init.py @@ -0,0 +1 @@ +# This file intentionally left blank. From 0836454f4c264d6bf404c375a1ea775f296765fd Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:37:28 +0100 Subject: [PATCH 54/91] Move distributor init up --- gensvm/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gensvm/__init__.py b/gensvm/__init__.py index 20ee98c..ffa4d44 100644 --- a/gensvm/__init__.py +++ b/gensvm/__init__.py @@ -1,8 +1,9 @@ # -*- coding: utf-8 -*- +# Has to be first +from . import _distributor_init + from .__version__ import __version__ from .core import GenSVM from .gridsearch import GenSVMGridSearchCV - -from . import _distributor_init From 51649574f19d0763f829991ebf16d6b38edb9420 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:43:07 +0100 Subject: [PATCH 55/91] attempt to debug wheel contents --- build_tools/github/repair_windows_wheels.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index eace457..428bc5b 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -13,6 +13,8 @@ BITNESS=$3 # In this case, we need to vendor VCRUNTIME140.dll wheel unpack "$WHEEL" WHEEL_DIRNAME=$(ls -d gensvm-*) +tree "${WHEEL_DIRNAME}" python build_tools/github/vendor.py "$WHEEL_DIRNAME" "$BITNESS" +tree "${WHEEL_DIRNAME}" wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" From f11c9b3c13bbc0a52368903d426878a518a17693 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 21:46:34 +0100 Subject: [PATCH 56/91] tree not available --- build_tools/github/repair_windows_wheels.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index 428bc5b..a49cab1 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -13,8 +13,8 @@ BITNESS=$3 # In this case, we need to vendor VCRUNTIME140.dll wheel unpack "$WHEEL" WHEEL_DIRNAME=$(ls -d gensvm-*) -tree "${WHEEL_DIRNAME}" +ls -R "${WHEEL_DIRNAME}" python build_tools/github/vendor.py "$WHEEL_DIRNAME" "$BITNESS" -tree "${WHEEL_DIRNAME}" +ls -R "${WHEEL_DIRNAME}" wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" From 3fdb1214d5fde609ab5285f79e01d4727c3610f7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:03:02 +0100 Subject: [PATCH 57/91] debugging --- build_tools/github/repair_windows_wheels.sh | 12 ++++++++++-- build_tools/github/vendor.py | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index a49cab1..351c26b 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -13,8 +13,16 @@ BITNESS=$3 # In this case, we need to vendor VCRUNTIME140.dll wheel unpack "$WHEEL" WHEEL_DIRNAME=$(ls -d gensvm-*) -ls -R "${WHEEL_DIRNAME}" + +ls -R -a "${WHEEL_DIRNAME}" + python build_tools/github/vendor.py "$WHEEL_DIRNAME" "$BITNESS" -ls -R "${WHEEL_DIRNAME}" + +sleep 1 + +ls -R -a "${WHEEL_DIRNAME}" + +sleep 1 + wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 54a8958..35bd4c9 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -119,7 +119,7 @@ def main(wheel_dirname, bitness): target_folder = op.join(wheel_dirname, TARGET_FOLDER) distributor_init = op.join(wheel_dirname, DISTRIBUTOR_INIT) - # Create the "sklearn/.libs" subfolder + # Create the "gensvm/.libs" subfolder if not op.exists(target_folder): os.mkdir(target_folder) From a04fc6eb57ba4c9bf3081efa07a30b08fd4201d7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:09:55 +0100 Subject: [PATCH 58/91] debug import failures --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 54b989c..69b51f8 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }} CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }} - CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/" + CIBW_TEST_COMMAND: "python -VV && python -vvvv -m unittest discover -f -s {project}/tests/" CIBW_TEST_EXTRAS: "dev" CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows.ps1 From 17fc2a6a6b742487c5f1931c45ef6c2f8d37ef72 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:17:12 +0100 Subject: [PATCH 59/91] inspect distributor init --- .github/workflows/deploy.yml | 2 +- build_tools/github/repair_windows_wheels.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 69b51f8..54b989c 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -38,7 +38,7 @@ jobs: CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} ${{ matrix.bitness }} CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} ${{ matrix.bitness }} - CIBW_TEST_COMMAND: "python -VV && python -vvvv -m unittest discover -f -s {project}/tests/" + CIBW_TEST_COMMAND: "python -VV && python -m unittest discover -f -s {project}/tests/" CIBW_TEST_EXTRAS: "dev" CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows.ps1 diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index 351c26b..4c1b142 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -24,5 +24,9 @@ ls -R -a "${WHEEL_DIRNAME}" sleep 1 +cat "${WHEEL_DIRNAME}/gensvm/_distributor_init.py" + +sleep 1 + wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" From 9d7156741856a478b3d7f88e8bd87eddf4a8f6ce Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:25:22 +0100 Subject: [PATCH 60/91] attempt to inspect dll file --- build_tools/github/repair_windows_wheels.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index 4c1b142..c8bed79 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -28,5 +28,9 @@ cat "${WHEEL_DIRNAME}/gensvm/_distributor_init.py" sleep 1 +ldd "${WHEEL_DIRNAME}/gensvm/cython_wrapper/wrapper.cp37-win32.pyd" + +sleep 1 + wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" From 72afea3bf2f390f0835b87ddcab2ac47d8d28bd8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:34:32 +0100 Subject: [PATCH 61/91] attempt to inspect pyd file --- build_tools/github/inspect_pyd.ps1 | 1 + build_tools/github/repair_windows_wheels.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 build_tools/github/inspect_pyd.ps1 diff --git a/build_tools/github/inspect_pyd.ps1 b/build_tools/github/inspect_pyd.ps1 new file mode 100644 index 0000000..87f46e4 --- /dev/null +++ b/build_tools/github/inspect_pyd.ps1 @@ -0,0 +1 @@ +dumpbin /dependents gensvm-0.2.8/gensvm/cython_wrapper/wrapper.cp37-win32.pyd diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index c8bed79..a28cefc 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -28,7 +28,7 @@ cat "${WHEEL_DIRNAME}/gensvm/_distributor_init.py" sleep 1 -ldd "${WHEEL_DIRNAME}/gensvm/cython_wrapper/wrapper.cp37-win32.pyd" +pwsh build_tools/github/inspect_pyd.ps1 sleep 1 From ff21568a8ba11e8b85417454eb0ff11cd27ac768 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:49:36 +0100 Subject: [PATCH 62/91] remove inspect (no dumpbin) --- build_tools/github/repair_windows_wheels.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_tools/github/repair_windows_wheels.sh b/build_tools/github/repair_windows_wheels.sh index a28cefc..4c1b142 100644 --- a/build_tools/github/repair_windows_wheels.sh +++ b/build_tools/github/repair_windows_wheels.sh @@ -28,9 +28,5 @@ cat "${WHEEL_DIRNAME}/gensvm/_distributor_init.py" sleep 1 -pwsh build_tools/github/inspect_pyd.ps1 - -sleep 1 - wheel pack "$WHEEL_DIRNAME" -d "$DEST_DIR" rm -rf "$WHEEL_DIRNAME" From b23af8d61f07e6ef97b356219ebb4fd16cde21d7 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:49:44 +0100 Subject: [PATCH 63/91] try to vendorize openblas lib too --- build_tools/github/vendor.py | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 35bd4c9..a5acf99 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -19,9 +19,15 @@ VCRUNTIME140_SRC_PATH = "C:\\Windows\\System32\\vcruntime140.dll" VCRUNTIME140_1_SRC_PATH = "C:\\Windows\\System32\\vcruntime140_1.dll" +OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14-1\\lib\\native\\lib\\win32\\libopenblas.lib" +OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14-1\\lib\\native\\lib\\win32\\libopenblas.lib" + def make_distributor_init_32_bits( - distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename + distributor_init, + vcomp140_dll_filename, + vcruntime140_dll_filename, + openblas_lib_filename, ): """Create a _distributor_init.py file for 32-bit architectures. This file is imported first when importing the sklearn package @@ -46,10 +52,14 @@ def make_distributor_init_32_bits( libs_path = op.join(op.dirname(__file__), ".libs") vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") + openblas_lib_filename = op.join(libs_path, "{2}") WinDLL(op.abspath(vcomp140_dll_filename)) WinDLL(op.abspath(vcruntime140_dll_filename)) + WinDLL(op.abspath(openblas_lib_filename)) """.format( - vcomp140_dll_filename, vcruntime140_dll_filename + vcomp140_dll_filename, + vcruntime140_dll_filename, + openblas_lib_filename, ) ) ) @@ -60,6 +70,7 @@ def make_distributor_init_64_bits( vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, + openblas_lib_filename, ): """Create a _distributor_init.py file for 64-bit architectures. This file is imported first when importing the sklearn package @@ -86,13 +97,16 @@ def make_distributor_init_64_bits( vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") vcruntime140_1_dll_filename = op.join(libs_path, "{2}") + openblas_lib_filename = op.join(libs_path, "{3}") WinDLL(op.abspath(vcomp140_dll_filename)) WinDLL(op.abspath(vcruntime140_dll_filename)) WinDLL(op.abspath(vcruntime140_1_dll_filename)) + WinDLL(op.abspath(openblas_lib_filename)) """.format( vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, + openblas_lib_filename, ) ) ) @@ -133,11 +147,23 @@ def main(wheel_dirname, bitness): print(f"Copying {VCRUNTIME140_1_SRC_PATH} to {target_folder}.") shutil.copy2(VCRUNTIME140_1_SRC_PATH, target_folder) + if bitness == "32": + print(f"Copying {OPENBLAS_LIB_32_PATH} to {target_folder}.") + shutil.copy2(OPENBLAS_LIB_32_PATH, target_folder) + openblas_lib_filename = op.basename(OPENBLAS_LIB_32_PATH) + else: + print(f"Copying {OPENBLAS_LIB_64_PATH} to {target_folder}.") + shutil.copy2(OPENBLAS_LIB_64_PATH, target_folder) + openblas_lib_filename = op.basename(OPENBLAS_LIB_64_PATH) + # Generate the _distributor_init file in the source tree print("Generating the '_distributor_init.py' file.") if bitness == "32": make_distributor_init_32_bits( - distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename + distributor_init, + vcomp140_dll_filename, + vcruntime140_dll_filename, + openblas_lib_filename, ) else: make_distributor_init_64_bits( @@ -145,6 +171,7 @@ def main(wheel_dirname, bitness): vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, + openblas_lib_filename, ) From 89a26df30821bfd74faa6946985f9777253deb21 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 22:54:37 +0100 Subject: [PATCH 64/91] fix typos --- build_tools/github/vendor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index a5acf99..217d9e2 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -19,8 +19,8 @@ VCRUNTIME140_SRC_PATH = "C:\\Windows\\System32\\vcruntime140.dll" VCRUNTIME140_1_SRC_PATH = "C:\\Windows\\System32\\vcruntime140_1.dll" -OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14-1\\lib\\native\\lib\\win32\\libopenblas.lib" -OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14-1\\lib\\native\\lib\\win32\\libopenblas.lib" +OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" +OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" def make_distributor_init_32_bits( From bec828fc2352207fabdf43e95f7fc603ba194781 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 23:00:19 +0100 Subject: [PATCH 65/91] package native dlls --- build_tools/github/vendor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 217d9e2..69e18fa 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -19,8 +19,8 @@ VCRUNTIME140_SRC_PATH = "C:\\Windows\\System32\\vcruntime140.dll" VCRUNTIME140_1_SRC_PATH = "C:\\Windows\\System32\\vcruntime140_1.dll" -OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" -OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" +OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" +OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" def make_distributor_init_32_bits( From a0cd514cae135e16c765998e9d07b4694706094b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Aug 2021 23:11:36 +0100 Subject: [PATCH 66/91] debug why not found --- build_tools/github/vendor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 69e18fa..9a09c74 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -53,6 +53,8 @@ def make_distributor_init_32_bits( vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") openblas_lib_filename = op.join(libs_path, "{2}") + print(openblas_lib_filename) + print(op.abspath(openblas_lib_filename)) WinDLL(op.abspath(vcomp140_dll_filename)) WinDLL(op.abspath(vcruntime140_dll_filename)) WinDLL(op.abspath(openblas_lib_filename)) From 76b9a0c66fca67b06dbf38c9b724ffd8eedff911 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 9 Sep 2021 23:20:44 +0100 Subject: [PATCH 67/91] Print some more info --- build_tools/github/vendor.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 9a09c74..bde8338 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -50,11 +50,16 @@ def make_distributor_init_32_bits( if os.name == "nt": # Load vcomp140.dll and vcruntime140.dll libs_path = op.join(op.dirname(__file__), ".libs") + vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") openblas_lib_filename = op.join(libs_path, "{2}") - print(openblas_lib_filename) - print(op.abspath(openblas_lib_filename)) + + print("vcomp140_dll_filename", vcomp140_dll_filename) + print("vcruntime140_dll_filename", vcruntime140_dll_filename) + print("openblas_lib_filename", openblas_lib_filename) + print("openblas_lib_filename absolute", op.abspath(openblas_lib_filename)) + WinDLL(op.abspath(vcomp140_dll_filename)) WinDLL(op.abspath(vcruntime140_dll_filename)) WinDLL(op.abspath(openblas_lib_filename)) From 2b138633d56dd8fed52fd370e472d169a4a15714 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 9 Sep 2021 23:36:38 +0100 Subject: [PATCH 68/91] try different dlls --- build_tools/github/vendor.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index bde8338..a641f1e 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,6 +22,10 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" +# TEMP +OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.dll" +OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.dll" + def make_distributor_init_32_bits( distributor_init, @@ -151,15 +155,15 @@ def main(wheel_dirname, bitness): shutil.copy2(VCRUNTIME140_SRC_PATH, target_folder) if bitness == "64": - print(f"Copying {VCRUNTIME140_1_SRC_PATH} to {target_folder}.") + print(f"Copying {VCRUNTIME140_1_SRC_PATH} to {target_folder}") shutil.copy2(VCRUNTIME140_1_SRC_PATH, target_folder) if bitness == "32": - print(f"Copying {OPENBLAS_LIB_32_PATH} to {target_folder}.") + print(f"Copying {OPENBLAS_LIB_32_PATH} to {target_folder}") shutil.copy2(OPENBLAS_LIB_32_PATH, target_folder) openblas_lib_filename = op.basename(OPENBLAS_LIB_32_PATH) else: - print(f"Copying {OPENBLAS_LIB_64_PATH} to {target_folder}.") + print(f"Copying {OPENBLAS_LIB_64_PATH} to {target_folder}") shutil.copy2(OPENBLAS_LIB_64_PATH, target_folder) openblas_lib_filename = op.basename(OPENBLAS_LIB_64_PATH) From 1de2fdc306e38668eb675a0b06e3b4ee80d402a4 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 9 Sep 2021 23:38:24 +0100 Subject: [PATCH 69/91] remove test lib paths (not dlls) --- build_tools/github/vendor.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index a641f1e..d936dbc 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,10 +22,6 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" -# TEMP -OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.dll" -OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.dll" - def make_distributor_init_32_bits( distributor_init, From bfc6c03e666ca00f7f961f889747fe72519bc0f4 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 9 Sep 2021 23:56:12 +0100 Subject: [PATCH 70/91] Copy all dlls that come with openblas --- build_tools/github/vendor.py | 51 ++++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index d936dbc..fcaab6b 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,12 +22,20 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" +OPENBLAS_32_LIBGCC = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libgcc_s_sjlj-1.dll" +OPENBLAS_32_FORTRAN = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libgfortran-3.dll" +OPENBLAS_32_OPENBLAS = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" +OPENBLAS_32_QUADMATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libquadmath-0.dll" + def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, + openblas_gcc_filename, + openblas_fortran_filename, openblas_lib_filename, + openblas_quadmath_filename, ): """Create a _distributor_init.py file for 32-bit architectures. This file is imported first when importing the sklearn package @@ -53,20 +61,38 @@ def make_distributor_init_32_bits( vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") - openblas_lib_filename = op.join(libs_path, "{2}") + openblas_gcc_filename = op.join(libs_path, "{2}") + openblas_fortran_filename = op.join(libs_path, "{3}") + openblas_lib_filename = op.join(libs_path, "{4}") + openblas_quadmath_filename = op.join(libs_path, "{5}") print("vcomp140_dll_filename", vcomp140_dll_filename) print("vcruntime140_dll_filename", vcruntime140_dll_filename) + print("openblas_gcc_filename", openblas_gcc_filename) + print("openblas_fortran_filename", openblas_fortran_filename) print("openblas_lib_filename", openblas_lib_filename) - print("openblas_lib_filename absolute", op.abspath(openblas_lib_filename)) + print("openblas_quadmath_filename", openblas_quadmath_filename) + print("Loading vcomp140") WinDLL(op.abspath(vcomp140_dll_filename)) + print("Loading vcruntime140") WinDLL(op.abspath(vcruntime140_dll_filename)) + print("Loading openblas_gcc") + WinDLL(op.abspath(openblas_gcc_filename)) + print("Loading openblas_fortran") + WinDLL(op.abspath(openblas_fortran_filename)) + print("Loading openblas_quadmath") + WinDLL(op.abspath(openblas_quadmath_filename)) + print("Loading openblas_lib") WinDLL(op.abspath(openblas_lib_filename)) + """.format( vcomp140_dll_filename, vcruntime140_dll_filename, + openblas_gcc_filename, + openblas_fortran_filename, openblas_lib_filename, + openblas_quadmath_filename, ) ) ) @@ -155,9 +181,21 @@ def main(wheel_dirname, bitness): shutil.copy2(VCRUNTIME140_1_SRC_PATH, target_folder) if bitness == "32": - print(f"Copying {OPENBLAS_LIB_32_PATH} to {target_folder}") - shutil.copy2(OPENBLAS_LIB_32_PATH, target_folder) - openblas_lib_filename = op.basename(OPENBLAS_LIB_32_PATH) + print(f"Copying {OPENBLAS_32_LIBGCC} to {target_folder}") + shutil.copy2(OPENBLAS_32_LIBGCC, target_folder) + openblas_gcc_filename = op.basename(OPENBLAS_32_LIBGCC) + + print(f"Copying {OPENBLAS_32_FORTRAN} to {target_folder}") + shutil.copy2(OPENBLAS_32_FORTRAN, target_folder) + openblas_fortran_filename = op.basename(OPENBLAS_32_FORTRAN) + + print(f"Copying {OPENBLAS_32_OPENBLAS} to {target_folder}") + shutil.copy2(OPENBLAS_32_OPENBLAS, target_folder) + openblas_lib_filename = op.basename(OPENBLAS_32_OPENBLAS) + + print(f"Copying {OPENBLAS_32_QUADMATH} to {target_folder}") + shutil.copy2(OPENBLAS_32_QUADMATH, target_folder) + openblas_quadmath_filename = op.basename(OPENBLAS_32_QUADMATH) else: print(f"Copying {OPENBLAS_LIB_64_PATH} to {target_folder}") shutil.copy2(OPENBLAS_LIB_64_PATH, target_folder) @@ -170,7 +208,10 @@ def main(wheel_dirname, bitness): distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, + openblas_gcc_filename, + openblas_fortran_filename, openblas_lib_filename, + openblas_quadmath_filename, ) else: make_distributor_init_64_bits( From 7d63cefd7399a7eecc2e5e2881204fa15dd8427c Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 10 Sep 2021 00:03:22 +0100 Subject: [PATCH 71/91] debug where failure occurs --- build_tools/github/vendor.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index fcaab6b..2744226 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -53,6 +53,7 @@ def make_distributor_init_32_bits( that build the wheel. ''' import os + import time import os.path as op from ctypes import WinDLL if os.name == "nt": @@ -67,22 +68,38 @@ def make_distributor_init_32_bits( openblas_quadmath_filename = op.join(libs_path, "{5}") print("vcomp140_dll_filename", vcomp140_dll_filename) + time.sleep(1) print("vcruntime140_dll_filename", vcruntime140_dll_filename) + time.sleep(1) print("openblas_gcc_filename", openblas_gcc_filename) + time.sleep(1) print("openblas_fortran_filename", openblas_fortran_filename) + time.sleep(1) print("openblas_lib_filename", openblas_lib_filename) + time.sleep(1) print("openblas_quadmath_filename", openblas_quadmath_filename) + time.sleep(1) print("Loading vcomp140") WinDLL(op.abspath(vcomp140_dll_filename)) + time.sleep(1) + print("Loading vcruntime140") WinDLL(op.abspath(vcruntime140_dll_filename)) + time.sleep(1) + print("Loading openblas_gcc") WinDLL(op.abspath(openblas_gcc_filename)) + time.sleep(1) + print("Loading openblas_fortran") WinDLL(op.abspath(openblas_fortran_filename)) + time.sleep(1) + print("Loading openblas_quadmath") WinDLL(op.abspath(openblas_quadmath_filename)) + time.sleep(1) + print("Loading openblas_lib") WinDLL(op.abspath(openblas_lib_filename)) From 3750fca434c920fc65e35cb46c2f08ffb1d1dbdf Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 10 Sep 2021 00:19:06 +0100 Subject: [PATCH 72/91] revert to single dll --- build_tools/github/vendor.py | 57 ++++-------------------------------- 1 file changed, 6 insertions(+), 51 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 2744226..6600690 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,20 +22,12 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" -OPENBLAS_32_LIBGCC = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libgcc_s_sjlj-1.dll" -OPENBLAS_32_FORTRAN = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libgfortran-3.dll" -OPENBLAS_32_OPENBLAS = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" -OPENBLAS_32_QUADMATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libquadmath-0.dll" - def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, - openblas_gcc_filename, - openblas_fortran_filename, openblas_lib_filename, - openblas_quadmath_filename, ): """Create a _distributor_init.py file for 32-bit architectures. This file is imported first when importing the sklearn package @@ -62,23 +54,16 @@ def make_distributor_init_32_bits( vcomp140_dll_filename = op.join(libs_path, "{0}") vcruntime140_dll_filename = op.join(libs_path, "{1}") - openblas_gcc_filename = op.join(libs_path, "{2}") - openblas_fortran_filename = op.join(libs_path, "{3}") - openblas_lib_filename = op.join(libs_path, "{4}") - openblas_quadmath_filename = op.join(libs_path, "{5}") + openblas_lib_filename = op.join(libs_path, "{2}") print("vcomp140_dll_filename", vcomp140_dll_filename) time.sleep(1) + print("vcruntime140_dll_filename", vcruntime140_dll_filename) time.sleep(1) - print("openblas_gcc_filename", openblas_gcc_filename) - time.sleep(1) - print("openblas_fortran_filename", openblas_fortran_filename) - time.sleep(1) + print("openblas_lib_filename", openblas_lib_filename) time.sleep(1) - print("openblas_quadmath_filename", openblas_quadmath_filename) - time.sleep(1) print("Loading vcomp140") WinDLL(op.abspath(vcomp140_dll_filename)) @@ -88,28 +73,13 @@ def make_distributor_init_32_bits( WinDLL(op.abspath(vcruntime140_dll_filename)) time.sleep(1) - print("Loading openblas_gcc") - WinDLL(op.abspath(openblas_gcc_filename)) - time.sleep(1) - - print("Loading openblas_fortran") - WinDLL(op.abspath(openblas_fortran_filename)) - time.sleep(1) - - print("Loading openblas_quadmath") - WinDLL(op.abspath(openblas_quadmath_filename)) - time.sleep(1) - print("Loading openblas_lib") WinDLL(op.abspath(openblas_lib_filename)) """.format( vcomp140_dll_filename, vcruntime140_dll_filename, - openblas_gcc_filename, - openblas_fortran_filename, openblas_lib_filename, - openblas_quadmath_filename, ) ) ) @@ -198,21 +168,9 @@ def main(wheel_dirname, bitness): shutil.copy2(VCRUNTIME140_1_SRC_PATH, target_folder) if bitness == "32": - print(f"Copying {OPENBLAS_32_LIBGCC} to {target_folder}") - shutil.copy2(OPENBLAS_32_LIBGCC, target_folder) - openblas_gcc_filename = op.basename(OPENBLAS_32_LIBGCC) - - print(f"Copying {OPENBLAS_32_FORTRAN} to {target_folder}") - shutil.copy2(OPENBLAS_32_FORTRAN, target_folder) - openblas_fortran_filename = op.basename(OPENBLAS_32_FORTRAN) - - print(f"Copying {OPENBLAS_32_OPENBLAS} to {target_folder}") - shutil.copy2(OPENBLAS_32_OPENBLAS, target_folder) - openblas_lib_filename = op.basename(OPENBLAS_32_OPENBLAS) - - print(f"Copying {OPENBLAS_32_QUADMATH} to {target_folder}") - shutil.copy2(OPENBLAS_32_QUADMATH, target_folder) - openblas_quadmath_filename = op.basename(OPENBLAS_32_QUADMATH) + print(f"Copying {OPENBLAS_LIB_32_PATH} to {target_folder}") + shutil.copy2(OPENBLAS_LIB_32_PATH, target_folder) + openblas_lib_filename = op.basename(OPENBLAS_LIB_32_PATH) else: print(f"Copying {OPENBLAS_LIB_64_PATH} to {target_folder}") shutil.copy2(OPENBLAS_LIB_64_PATH, target_folder) @@ -225,10 +183,7 @@ def main(wheel_dirname, bitness): distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, - openblas_gcc_filename, - openblas_fortran_filename, openblas_lib_filename, - openblas_quadmath_filename, ) else: make_distributor_init_64_bits( From 6dd8eb8a9b74b8873b87055b0fd228501a3c8083 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Fri, 10 Sep 2021 00:20:31 +0100 Subject: [PATCH 73/91] try again with alternative files --- build_tools/github/vendor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 6600690..ae99fed 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,6 +22,9 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" +# TEMP +OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" +OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.lib" def make_distributor_init_32_bits( distributor_init, From bb8a1de53153feb749096f5ebdd3fe90fa0655e3 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 14:16:32 +0100 Subject: [PATCH 74/91] Increase build verbosity --- .github/workflows/deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 54b989c..aa90be3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -43,6 +43,7 @@ jobs: CIBW_SKIP: "pp* cp27-* cp33-* cp34-* cp35-*" CIBW_BEFORE_ALL_WINDOWS: pwsh build_tools/github/setup_windows.ps1 CIBW_BEFORE_BUILD: "pip install numpy Cython" + CIBW_BUILD_VERBOSITY: 1 #CIBW_ARCHS_MACOS: x86_64 arm64 universal2 #CIBW_ARCHS_LINUX: auto aarch64 run: bash build_tools/github/build_wheels.sh From 527531c70f30948a3f5d75328ef55ebd99494759 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 14:16:57 +0100 Subject: [PATCH 75/91] Reinstate dlls --- build_tools/github/vendor.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index ae99fed..678369b 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -22,10 +22,6 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" -# TEMP -OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\win32\\libopenblas.lib" -OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\lib\\x64\\libopenblas.lib" - def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, From 6a9d6ddba503944fc75f6548601c0e9e29c047fc Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 14:24:54 +0100 Subject: [PATCH 76/91] try building with bin instead of lib --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1a11a6a..14e18c0 100644 --- a/setup.py +++ b/setup.py @@ -146,7 +146,8 @@ def atlas_not_found(blas_info_): "OpenBLAS.0.2.14.1", "lib", "native", - "lib", + #"lib", + "bin", "x64" if bitness == "64" else "win32", ] ) From f4d2a879ffac08edc001366ba1e8e76171a96a7b Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 14:29:06 +0100 Subject: [PATCH 77/91] undo previous --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 14e18c0..1a11a6a 100644 --- a/setup.py +++ b/setup.py @@ -146,8 +146,7 @@ def atlas_not_found(blas_info_): "OpenBLAS.0.2.14.1", "lib", "native", - #"lib", - "bin", + "lib", "x64" if bitness == "64" else "win32", ] ) From 3735fe4a32315bda9115acc5022d136362467bc2 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 14:29:13 +0100 Subject: [PATCH 78/91] more debugging --- build_tools/github/vendor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 678369b..ab2257a 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -56,24 +56,30 @@ def make_distributor_init_32_bits( openblas_lib_filename = op.join(libs_path, "{2}") print("vcomp140_dll_filename", vcomp140_dll_filename) + assert op.exists(op.abspath(vcomp140_dll_filename)) time.sleep(1) print("vcruntime140_dll_filename", vcruntime140_dll_filename) + assert op.exists(op.abspath(vcruntime140_dll_filename)) time.sleep(1) print("openblas_lib_filename", openblas_lib_filename) + assert op.exists(op.abspath(openblas_lib_filename)) time.sleep(1) print("Loading vcomp140") WinDLL(op.abspath(vcomp140_dll_filename)) + print("Loaded vcomp140 successfully") time.sleep(1) print("Loading vcruntime140") WinDLL(op.abspath(vcruntime140_dll_filename)) + print("Loaded vcruntime140 successfully") time.sleep(1) print("Loading openblas_lib") WinDLL(op.abspath(openblas_lib_filename)) + print("Loaded openblas_lib successfully") """.format( vcomp140_dll_filename, From c06e3bc7fb7f6da951c22249f7585956f0d04fa5 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 15:15:34 +0100 Subject: [PATCH 79/91] try taking the dll from numpy --- build_tools/github/vendor.py | 80 ++++++++++++++++++++++-------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index ab2257a..b71868c 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -46,40 +46,60 @@ def make_distributor_init_32_bits( import os import time import os.path as op + import numpy + import glob from ctypes import WinDLL if os.name == "nt": # Load vcomp140.dll and vcruntime140.dll libs_path = op.join(op.dirname(__file__), ".libs") - - vcomp140_dll_filename = op.join(libs_path, "{0}") - vcruntime140_dll_filename = op.join(libs_path, "{1}") - openblas_lib_filename = op.join(libs_path, "{2}") - - print("vcomp140_dll_filename", vcomp140_dll_filename) - assert op.exists(op.abspath(vcomp140_dll_filename)) - time.sleep(1) - - print("vcruntime140_dll_filename", vcruntime140_dll_filename) - assert op.exists(op.abspath(vcruntime140_dll_filename)) - time.sleep(1) - - print("openblas_lib_filename", openblas_lib_filename) - assert op.exists(op.abspath(openblas_lib_filename)) - time.sleep(1) - - print("Loading vcomp140") - WinDLL(op.abspath(vcomp140_dll_filename)) - print("Loaded vcomp140 successfully") - time.sleep(1) - - print("Loading vcruntime140") - WinDLL(op.abspath(vcruntime140_dll_filename)) - print("Loaded vcruntime140 successfully") - time.sleep(1) - - print("Loading openblas_lib") - WinDLL(op.abspath(openblas_lib_filename)) - print("Loaded openblas_lib successfully") + np_libs_path = op.join(op.dirname(numpy.__file__), '.libs') + + DLL_filenames = [] + DLL_filenames.append(op.join(libs_path, "{0}")) + DLL_filenames.append(op.join(libs_path, "{1}")) + if os.path.isdir(np_libs_path): + ob_dlls = list(glob.glob(os.path.join(np_libs_dir, '*openblas*dll'))) + else: + ob_dlls = [op.join(libs_path, "{2}")] + + DLL_filenames.extend(ob_dlls) + + for dll_file in DLL_filenames: + print("Loading dll file:", op.abspath(dll_file)) + WinDLL(op.abspath(dll_file)) + print("Success") + time.sleep(1) + + # vcomp140_dll_filename = op.join(libs_path, "{0}") + # vcruntime140_dll_filename = op.join(libs_path, "{1}") + # if op.exists(np_libs_path): + # openblas_lib_filename = op.join(libs_path, "{2}") + + # print("vcomp140_dll_filename", vcomp140_dll_filename) + # assert op.exists(op.abspath(vcomp140_dll_filename)) + # time.sleep(1) + + # print("vcruntime140_dll_filename", vcruntime140_dll_filename) + # assert op.exists(op.abspath(vcruntime140_dll_filename)) + # time.sleep(1) + + # print("openblas_lib_filename", openblas_lib_filename) + # assert op.exists(op.abspath(openblas_lib_filename)) + # time.sleep(1) + + # print("Loading vcomp140") + # WinDLL(op.abspath(vcomp140_dll_filename)) + # print("Loaded vcomp140 successfully") + # time.sleep(1) + + # print("Loading vcruntime140") + # WinDLL(op.abspath(vcruntime140_dll_filename)) + # print("Loaded vcruntime140 successfully") + # time.sleep(1) + + # print("Loading openblas_lib") + # WinDLL(op.abspath(openblas_lib_filename)) + # print("Loaded openblas_lib successfully") """.format( vcomp140_dll_filename, From 3d864aa8761aa4893dfe0413d607e84b22cdcd55 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 12 Sep 2021 15:22:38 +0100 Subject: [PATCH 80/91] fix typo --- build_tools/github/vendor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index b71868c..24a2ca0 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -52,12 +52,12 @@ def make_distributor_init_32_bits( if os.name == "nt": # Load vcomp140.dll and vcruntime140.dll libs_path = op.join(op.dirname(__file__), ".libs") - np_libs_path = op.join(op.dirname(numpy.__file__), '.libs') + np_libs_dir = op.join(op.dirname(numpy.__file__), '.libs') DLL_filenames = [] DLL_filenames.append(op.join(libs_path, "{0}")) DLL_filenames.append(op.join(libs_path, "{1}")) - if os.path.isdir(np_libs_path): + if os.path.isdir(np_libs_dir): ob_dlls = list(glob.glob(os.path.join(np_libs_dir, '*openblas*dll'))) else: ob_dlls = [op.join(libs_path, "{2}")] From 966dedb50fa36c9d020bcf7155f858fe8000534e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sat, 2 Oct 2021 23:29:10 +0100 Subject: [PATCH 81/91] Give tmate a try --- .github/workflows/deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index aa90be3..7afad11 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,6 +33,9 @@ jobs: with: python-version: '3.7' + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + - name: Build and test wheels env: CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} From 7e04f5c1a4125d470b17ba63f9e46cea85a9d24e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 18 Oct 2021 19:40:34 +0100 Subject: [PATCH 82/91] Mark which dll is loaded --- build_tools/github/vendor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 24a2ca0..edf2d3f 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -67,7 +67,7 @@ def make_distributor_init_32_bits( for dll_file in DLL_filenames: print("Loading dll file:", op.abspath(dll_file)) WinDLL(op.abspath(dll_file)) - print("Success") + print("Successfully loaded:", op.abspath(dll_file)) time.sleep(1) # vcomp140_dll_filename = op.join(libs_path, "{0}") From 4ed9856adee6feceb52f9d234e596934f9eb844a Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Mon, 18 Oct 2021 19:41:03 +0100 Subject: [PATCH 83/91] disable tmate --- .github/workflows/deploy.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 7afad11..d2e044d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,8 +33,8 @@ jobs: with: python-version: '3.7' - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 + # - name: Setup tmate session + # uses: mxschmitt/action-tmate@v3 - name: Build and test wheels env: From 5cfc11380c7e38c697735f839b396f40c6de1532 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 14 Apr 2022 01:05:36 +0100 Subject: [PATCH 84/91] fix cron line --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6290ab1..c019002 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: branches: - master schedule: - - cron: 42 5 * * */14 + - cron: 42 5 */14 * * jobs: test: From f46ff7e161d9e346f822291f6620b0b7e2e75ca8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 22:29:54 +0100 Subject: [PATCH 85/91] try adding lib to the manifest --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index 10fdf48..b1610d8 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,6 +2,7 @@ include setup.py include README.md include LICENSE include CHANGELOG.md +include gensvm/cython_wrapper/wrapper.lib recursive-include gensvm *.py recursive-include gensvm *.pxd recursive-include gensvm *.pyx From 984b549bb2643ccb1f0626862dd90386e142bcc8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 22:51:52 +0100 Subject: [PATCH 86/91] try to grab the wrapper.lib when vendorizing --- MANIFEST.in | 1 - build_tools/github/vendor.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index b1610d8..10fdf48 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,6 @@ include setup.py include README.md include LICENSE include CHANGELOG.md -include gensvm/cython_wrapper/wrapper.lib recursive-include gensvm *.py recursive-include gensvm *.pxd recursive-include gensvm *.pyx diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index edf2d3f..6489f4a 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -6,6 +6,7 @@ """ +import glob import os import os.path as op import shutil @@ -22,6 +23,7 @@ OPENBLAS_LIB_32_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\win32\\libopenblas.dll" OPENBLAS_LIB_64_PATH = "D:\\cibw\\OpenBLAS\\OpenBLAS.0.2.14.1\\lib\\native\\bin\\x64\\libopenblas.dll" + def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, @@ -182,6 +184,15 @@ def main(wheel_dirname, bitness): if not op.exists(target_folder): os.mkdir(target_folder) + # Find the .lib file for the Cython wrapper + libs = glob.glob("build/*/Release/gensvm/cython_wrapper/wrapper.lib") + if not libs: + print("No wrapper.lib found!") + else: + wrap_lib = libs[0] + print(f"Copying {wrap_lib} to {target_folder}.") + shutil.copy2(wrap_lib, target_folder) + print(f"Copying {VCOMP140_SRC_PATH} to {target_folder}.") shutil.copy2(VCOMP140_SRC_PATH, target_folder) From 59ea325d5267769c821a7455097a651be4022f8d Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 22:59:18 +0100 Subject: [PATCH 87/91] also load the wrapper lib as dll --- build_tools/github/vendor.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 6489f4a..48a317e 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -28,6 +28,7 @@ def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, + wrapper_lib_filename, openblas_lib_filename, ): """Create a _distributor_init.py file for 32-bit architectures. @@ -59,10 +60,11 @@ def make_distributor_init_32_bits( DLL_filenames = [] DLL_filenames.append(op.join(libs_path, "{0}")) DLL_filenames.append(op.join(libs_path, "{1}")) + DLL_filenames.append(op.join(libs_path, "{2}")) if os.path.isdir(np_libs_dir): ob_dlls = list(glob.glob(os.path.join(np_libs_dir, '*openblas*dll'))) else: - ob_dlls = [op.join(libs_path, "{2}")] + ob_dlls = [op.join(libs_path, "{3}")] DLL_filenames.extend(ob_dlls) @@ -106,6 +108,7 @@ def make_distributor_init_32_bits( """.format( vcomp140_dll_filename, vcruntime140_dll_filename, + wrapper_lib_filename, openblas_lib_filename, ) ) @@ -117,6 +120,7 @@ def make_distributor_init_64_bits( vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, + wrapper_lib_filename, openblas_lib_filename, ): """Create a _distributor_init.py file for 64-bit architectures. @@ -189,9 +193,9 @@ def main(wheel_dirname, bitness): if not libs: print("No wrapper.lib found!") else: - wrap_lib = libs[0] - print(f"Copying {wrap_lib} to {target_folder}.") - shutil.copy2(wrap_lib, target_folder) + wrapper_lib_filename = libs[0] + print(f"Copying {wrapper_lib_filename} to {target_folder}.") + shutil.copy2(wrapper_lib_filename, target_folder) print(f"Copying {VCOMP140_SRC_PATH} to {target_folder}.") shutil.copy2(VCOMP140_SRC_PATH, target_folder) @@ -219,6 +223,7 @@ def main(wheel_dirname, bitness): distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, + wrapper_lib_filename, openblas_lib_filename, ) else: @@ -227,6 +232,7 @@ def main(wheel_dirname, bitness): vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, + wrapper_lib_filename, openblas_lib_filename, ) From 2908915b67c3977f73968595c01db2ea7f3892e8 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 23:18:25 +0100 Subject: [PATCH 88/91] remove old stuff --- build_tools/github/vendor.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index 48a317e..da9fa1f 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -74,37 +74,6 @@ def make_distributor_init_32_bits( print("Successfully loaded:", op.abspath(dll_file)) time.sleep(1) - # vcomp140_dll_filename = op.join(libs_path, "{0}") - # vcruntime140_dll_filename = op.join(libs_path, "{1}") - # if op.exists(np_libs_path): - # openblas_lib_filename = op.join(libs_path, "{2}") - - # print("vcomp140_dll_filename", vcomp140_dll_filename) - # assert op.exists(op.abspath(vcomp140_dll_filename)) - # time.sleep(1) - - # print("vcruntime140_dll_filename", vcruntime140_dll_filename) - # assert op.exists(op.abspath(vcruntime140_dll_filename)) - # time.sleep(1) - - # print("openblas_lib_filename", openblas_lib_filename) - # assert op.exists(op.abspath(openblas_lib_filename)) - # time.sleep(1) - - # print("Loading vcomp140") - # WinDLL(op.abspath(vcomp140_dll_filename)) - # print("Loaded vcomp140 successfully") - # time.sleep(1) - - # print("Loading vcruntime140") - # WinDLL(op.abspath(vcruntime140_dll_filename)) - # print("Loaded vcruntime140 successfully") - # time.sleep(1) - - # print("Loading openblas_lib") - # WinDLL(op.abspath(openblas_lib_filename)) - # print("Loaded openblas_lib successfully") - """.format( vcomp140_dll_filename, vcruntime140_dll_filename, From 55a8eb30bf4f458ccd88e0e05a45ee5e5b861f6f Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 23:18:44 +0100 Subject: [PATCH 89/91] increase sleep for better log formatting --- build_tools/github/vendor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index da9fa1f..ef79c7b 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -72,7 +72,7 @@ def make_distributor_init_32_bits( print("Loading dll file:", op.abspath(dll_file)) WinDLL(op.abspath(dll_file)) print("Successfully loaded:", op.abspath(dll_file)) - time.sleep(1) + time.sleep(5) """.format( vcomp140_dll_filename, From b05ef6eb8028f632261e656423f2d4cb5d766619 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 23:18:59 +0100 Subject: [PATCH 90/91] use the basename when loading --- build_tools/github/vendor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index ef79c7b..ba8de8b 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -162,9 +162,10 @@ def main(wheel_dirname, bitness): if not libs: print("No wrapper.lib found!") else: - wrapper_lib_filename = libs[0] - print(f"Copying {wrapper_lib_filename} to {target_folder}.") - shutil.copy2(wrapper_lib_filename, target_folder) + wrapper_lib_path = libs[0] + wrapper_lib_filename = op.basename(wrapper_lib_path) + print(f"Copying {wrapper_lib_path} to {target_folder}.") + shutil.copy2(wrapper_lib_path, target_folder) print(f"Copying {VCOMP140_SRC_PATH} to {target_folder}.") shutil.copy2(VCOMP140_SRC_PATH, target_folder) From c10a6e59e0eb996438d53c2ac8e468082589eff2 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Sun, 17 Apr 2022 23:25:11 +0100 Subject: [PATCH 91/91] ship wrapper.lib but don't load it --- build_tools/github/vendor.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/build_tools/github/vendor.py b/build_tools/github/vendor.py index ba8de8b..424f968 100644 --- a/build_tools/github/vendor.py +++ b/build_tools/github/vendor.py @@ -15,6 +15,7 @@ TARGET_FOLDER = op.join("gensvm", ".libs") +WRAPPER_TARGET_FOLDER = op.join("gensvm", "cython_wrapper") DISTRIBUTOR_INIT = op.join("gensvm", "_distributor_init.py") VCOMP140_SRC_PATH = "C:\\Windows\\System32\\vcomp140.dll" VCRUNTIME140_SRC_PATH = "C:\\Windows\\System32\\vcruntime140.dll" @@ -28,7 +29,6 @@ def make_distributor_init_32_bits( distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, - wrapper_lib_filename, openblas_lib_filename, ): """Create a _distributor_init.py file for 32-bit architectures. @@ -60,11 +60,10 @@ def make_distributor_init_32_bits( DLL_filenames = [] DLL_filenames.append(op.join(libs_path, "{0}")) DLL_filenames.append(op.join(libs_path, "{1}")) - DLL_filenames.append(op.join(libs_path, "{2}")) if os.path.isdir(np_libs_dir): ob_dlls = list(glob.glob(os.path.join(np_libs_dir, '*openblas*dll'))) else: - ob_dlls = [op.join(libs_path, "{3}")] + ob_dlls = [op.join(libs_path, "{2}")] DLL_filenames.extend(ob_dlls) @@ -77,7 +76,6 @@ def make_distributor_init_32_bits( """.format( vcomp140_dll_filename, vcruntime140_dll_filename, - wrapper_lib_filename, openblas_lib_filename, ) ) @@ -89,7 +87,6 @@ def make_distributor_init_64_bits( vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, - wrapper_lib_filename, openblas_lib_filename, ): """Create a _distributor_init.py file for 64-bit architectures. @@ -151,6 +148,7 @@ def main(wheel_dirname, bitness): vcruntime140_1_dll_filename = op.basename(VCRUNTIME140_1_SRC_PATH) target_folder = op.join(wheel_dirname, TARGET_FOLDER) + wrapper_target_folder = op.join(wheel_dirname, WRAPPER_TARGET_FOLDER) distributor_init = op.join(wheel_dirname, DISTRIBUTOR_INIT) # Create the "gensvm/.libs" subfolder @@ -163,9 +161,8 @@ def main(wheel_dirname, bitness): print("No wrapper.lib found!") else: wrapper_lib_path = libs[0] - wrapper_lib_filename = op.basename(wrapper_lib_path) print(f"Copying {wrapper_lib_path} to {target_folder}.") - shutil.copy2(wrapper_lib_path, target_folder) + shutil.copy2(wrapper_lib_path, wrapper_target_folder) print(f"Copying {VCOMP140_SRC_PATH} to {target_folder}.") shutil.copy2(VCOMP140_SRC_PATH, target_folder) @@ -193,7 +190,6 @@ def main(wheel_dirname, bitness): distributor_init, vcomp140_dll_filename, vcruntime140_dll_filename, - wrapper_lib_filename, openblas_lib_filename, ) else: @@ -202,7 +198,6 @@ def main(wheel_dirname, bitness): vcomp140_dll_filename, vcruntime140_dll_filename, vcruntime140_1_dll_filename, - wrapper_lib_filename, openblas_lib_filename, )