From 4cab3dbb1bb99faaf55aee3240166c1698a2ab95 Mon Sep 17 00:00:00 2001 From: borisbolliet Date: Sun, 29 Sep 2024 22:22:16 +0100 Subject: [PATCH] Create pypi_upload_onlydocker_win.sh this file is useful for ref. But windows is not an available platform in docker/mac --- pypi_upload_onlydocker_win.sh | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100755 pypi_upload_onlydocker_win.sh diff --git a/pypi_upload_onlydocker_win.sh b/pypi_upload_onlydocker_win.sh new file mode 100755 index 00000000..edb68a1e --- /dev/null +++ b/pypi_upload_onlydocker_win.sh @@ -0,0 +1,40 @@ + +# Change to the class-sz directory +cd class-sz/ + +# Clean previous builds +make clean + +# Go back to the root directory +cd .. + +# Remove old build files +rm -rf build dist *.egg-info +rm -rf class-sz/python/classy_sz.*so +rm -rf class-sz/python/classy_sz.*egg-info + +# Check if Docker is running (this is relevant for Linux builds) +docker --version + +# Set environment variables and build wheels for Windows +CIBW_BUILD="cp310-*" \ +CIBW_SKIP="cp27-* cp34-* cp35-* cp36-* cp37-* cp38-* pp* *-win32" \ +CIBW_ARCHS="x86" \ +CIBW_BEFORE_BUILD="curl -O https://ftp.gnu.org/gnu/gsl/gsl-2.7.1.tar.gz && \ + tar -xzf gsl-2.7.1.tar.gz && \ + cd gsl-2.7.1 && \ + ./configure --prefix=/usr/local && \ + make && \ + make install && \ + cd .. && \ + curl -O http://www.fftw.org/fftw-3.3.10.tar.gz && \ + tar -xzf fftw-3.3.10.tar.gz && \ + cd fftw-3.3.10 && \ + ./configure --prefix=/usr/local --enable-shared && \ + make && \ + make install" \ + +CIBW_PLATFORM=windows + +python -m cibuildwheel --output-dir dist +