Skip to content

Commit

Permalink
Deploy for Python 3.11 as well. [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
crisluengo committed Dec 8, 2022
1 parent 3f2e2cf commit 0d8d910
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 82 deletions.
56 changes: 28 additions & 28 deletions tools/travis/deploy_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
export BUILD_THREADS=3
export DELOCATE=`pwd`/tools/travis/delocate

brew install python@3.7
brew install python@3.8
brew install python@3.9
brew install python@3.10
#brew install python@3.8
#brew install python@3.9
#brew install python@3.10
brew install python@3.11
# The install above might have changed the default version of `python3`, so we need to reinstall packages:
python3 -m pip install setuptools wheel build twine delocate

Expand All @@ -19,30 +19,30 @@ wget https://downloads.openmicroscopy.org/bio-formats/6.5.0/artifacts/bioformats
# Basic configuration
cmake .. -DDIP_PYDIP_WHEEL_INCLUDE_LIBS=On -DBIOFORMATS_JAR=`pwd`/bioformats_package.jar -DDIP_BUILD_DIPIMAGE=Off

# Python 3.7
export PYTHON=/usr/local/opt/python@3.7/bin/python3
export PYTHON_VERSION=3.7
cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Python 3.8
export PYTHON=/usr/local/opt/python@3.8/bin/python3
export PYTHON_VERSION=3.8
cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Python 3.9
export PYTHON=/usr/local/opt/python@3.9/bin/python3
export PYTHON_VERSION=3.9
cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Python 3.10
export PYTHON=/usr/local/opt/python@3.10/bin/python3
export PYTHON_VERSION=3.10
## Python 3.8
#export PYTHON=/usr/local/opt/python@3.8/bin/python3
#export PYTHON_VERSION=3.8
#cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
#make -j $BUILD_THREADS bdist_wheel
#python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl
#
## Python 3.9
#export PYTHON=/usr/local/opt/python@3.9/bin/python3
#export PYTHON_VERSION=3.9
#cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
#make -j $BUILD_THREADS bdist_wheel
#python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl
#
## Python 3.10
#export PYTHON=/usr/local/opt/python@3.10/bin/python3
#export PYTHON_VERSION=3.10
#cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
#make -j $BUILD_THREADS bdist_wheel
#python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Python 3.11
export PYTHON=/usr/local/opt/python@3.11/bin/python3
export PYTHON_VERSION=3.11
cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl
Expand Down
8 changes: 8 additions & 0 deletions tools/travis/deploy_macos_m1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export DELOCATE=`pwd`/tools/travis/delocate
brew install [email protected]
brew install [email protected]
brew install [email protected]
brew install [email protected]
# The install above might have changed the default version of `python3`, so we need to reinstall packages:
python3 -m pip install setuptools wheel build twine delocate
brew install wget
Expand Down Expand Up @@ -46,5 +47,12 @@ cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Python 3.11
export PYTHON=/opt/homebrew/opt/[email protected]/bin/python3
export PYTHON_VERSION=3.11
cmake .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=$PYTHON
make -j $BUILD_THREADS bdist_wheel
python3 $DELOCATE -w wheelhouse/ -v pydip/staging/dist/*.whl

# Upload to pypi.org
python3 -m twine upload -u __token__ -p $PYPI_TOKEN wheelhouse/*.whl
40 changes: 20 additions & 20 deletions tools/travis/deploy_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ REM Run this on Windows 10 with VS C++ build tools installed

REM Get Python versions

FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.7.* /B') do (SET PYTHON37=%%g)
FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.8.* /B') do (SET PYTHON38=%%g)
FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.9.* /B') do (SET PYTHON39=%%g)
FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.10.* /B') do (SET PYTHON310=%%g)
REM FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.8.* /B') do (SET PYTHON38=%%g)
REM FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.9.* /B') do (SET PYTHON39=%%g)
REM FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.10.* /B') do (SET PYTHON310=%%g)
FOR /F "tokens=*" %%g IN ('dir C:\hostedtoolcache\windows\Python\3.11.* /B') do (SET PYTHON311=%%g)

REM Setup
mkdir build
Expand All @@ -26,27 +26,27 @@ cd ..
REM Basic configuration
cmake .. -A x64 -DBIOFORMATS_JAR=%CD%\bioformats_package.jar -DFREEGLUT_INCLUDE_DIR=%CD%\freeglut-3.0.0\include -DFREEGLUT_LIBRARY=%CD%\freeglut-3.0.0\build\lib\Release\freeglut_static.lib -DFREEGLUT_STATIC=On -DDIP_BUILD_DIPIMAGE=Off -DDIP_PYDIP_WHEEL_INCLUDE_LIBS=On -DDIP_ENABLE_UNICODE=Off

REM Python 3.7
C:\hostedtoolcache\windows\Python\%PYTHON37%\x64\python.exe -m pip install setuptools wheel build
cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON37%\x64\python.exe
cmake --build . --target bdist_wheel --config Release
copy pydip\Release\staging\dist\*.whl wheelhouse

REM Python 3.8
C:\hostedtoolcache\windows\Python\%PYTHON38%\x64\python.exe -m pip install setuptools wheel build
cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON38%\x64\python.exe
cmake --build . --target bdist_wheel --config Release
copy pydip\Release\staging\dist\*.whl wheelhouse
REM C:\hostedtoolcache\windows\Python\%PYTHON38%\x64\python.exe -m pip install setuptools wheel build
REM cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON38%\x64\python.exe
REM cmake --build . --target bdist_wheel --config Release
REM copy pydip\Release\staging\dist\*.whl wheelhouse

REM Python 3.9
C:\hostedtoolcache\windows\Python\%PYTHON39%\x64\python.exe -m pip install setuptools wheel build
cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON39%\x64\python.exe
cmake --build . --target bdist_wheel --config Release
copy pydip\Release\staging\dist\*.whl wheelhouse
REM C:\hostedtoolcache\windows\Python\%PYTHON39%\x64\python.exe -m pip install setuptools wheel build
REM cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON39%\x64\python.exe
REM cmake --build . --target bdist_wheel --config Release
REM copy pydip\Release\staging\dist\*.whl wheelhouse

REM Python 3.10
C:\hostedtoolcache\windows\Python\%PYTHON310%\x64\python.exe -m pip install setuptools wheel build
cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON310%\x64\python.exe
REM C:\hostedtoolcache\windows\Python\%PYTHON310%\x64\python.exe -m pip install setuptools wheel build
REM cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON310%\x64\python.exe
REM cmake --build . --target bdist_wheel --config Release
REM copy pydip\Release\staging\dist\*.whl wheelhouse

REM Python 3.11
C:\hostedtoolcache\windows\Python\%PYTHON311%\x64\python.exe -m pip install setuptools wheel build
cmake .. -A x64 -DPYTHON_EXECUTABLE=C:\hostedtoolcache\windows\Python\%PYTHON311%\x64\python.exe
cmake --build . --target bdist_wheel --config Release
copy pydip\Release\staging\dist\*.whl wheelhouse

Expand Down
61 changes: 27 additions & 34 deletions tools/travis/manylinux2010.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# Setup
yum -y install wget freeglut-devel java-1.8.0-openjdk-devel.x86_64
/opt/python/cp37-cp37m/bin/python -m pip install cmake auditwheel
export CMAKE=/opt/python/cp37-cp37m/lib/python3.7/site-packages/cmake/data/bin/cmake
/opt/python/cp39-cp39m/bin/python -m pip install cmake auditwheel
export CMAKE=/opt/python/cp39-cp39m/lib/python3.9/site-packages/cmake/data/bin/cmake
export BUILD_THREADS=2
export AUDITWHEEL=`pwd`/diplib/tools/travis/auditwheel

Expand All @@ -18,39 +18,32 @@ wget https://downloads.openmicroscopy.org/bio-formats/6.5.0/artifacts/bioformats
# Basic configuration
$CMAKE .. -DDIP_PYDIP_WHEEL_INCLUDE_LIBS=On -DBIOFORMATS_JAR=`pwd`/bioformats_package.jar

# Python 3.6
export PYTHON=cp36-cp36m
export PYTHON_VERSION=3.6
## Python 3.8
#export PYTHON=cp38-cp38
#export PYTHON_VERSION=3.8
#$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
#make -j $BUILD_THREADS bdist_wheel
#/opt/python/cp39-cp39m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl
#
## Python 3.9
#export PYTHON=cp39-cp39
#export PYTHON_VERSION=3.9
#$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
#make -j $BUILD_THREADS bdist_wheel
#/opt/python/cp39-cp39m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl
#
## Python 3.10
#export PYTHON=cp310-cp310
#export PYTHON_VERSION=3.10
#$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
#make -j $BUILD_THREADS bdist_wheel
#/opt/python/cp39-cp39m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

# Python 3.11
export PYTHON=cp311-cp311
export PYTHON_VERSION=3.11
$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
make -j $BUILD_THREADS bdist_wheel
/opt/python/cp37-cp37m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

# Python 3.7
export PYTHON=cp37-cp37m
export PYTHON_VERSION=3.7
$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
make -j $BUILD_THREADS bdist_wheel
/opt/python/cp37-cp37m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

# Python 3.8
export PYTHON=cp38-cp38
export PYTHON_VERSION=3.8
$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
make -j $BUILD_THREADS bdist_wheel
/opt/python/cp37-cp37m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

# Python 3.9
export PYTHON=cp39-cp39
export PYTHON_VERSION=3.9
$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
make -j $BUILD_THREADS bdist_wheel
/opt/python/cp37-cp37m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

# Python 3.10
export PYTHON=cp310-cp310
export PYTHON_VERSION=3.10
$CMAKE .. -DPYBIND11_PYTHON_VERSION=$PYTHON_VERSION -DPYTHON_EXECUTABLE=/opt/python/$PYTHON/bin/python
make -j $BUILD_THREADS bdist_wheel
/opt/python/cp37-cp37m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl
/opt/python/cp39-cp39m/bin/python $AUDITWHEEL repair pydip/staging/dist/*.whl

mv wheelhouse /io

0 comments on commit 0d8d910

Please sign in to comment.