Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
CnlPepper committed Feb 12, 2023
2 parents 4a9c457 + 69b537a commit ea5bc96
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
19 changes: 13 additions & 6 deletions dev/build_wheels.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# to be run from within manylinux1 docker container
# to be run from within manylinux2010 docker container
# run the command below from the root of the source folder
# sudo docker run -ti -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /bin/bash
# sudo docker run -ti -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64 /bin/bash
# in the container run dev/build_wheels.sh

PLAT=manylinux1_x86_64
VERSION=0.8.1
PLAT=manylinux2010_x86_64
CORES=32

cd /io || exit
Expand All @@ -12,16 +13,22 @@ cd /io || exit
/opt/python/cp37-cp37m/bin/python -m pip install cython numpy==1.14.6
/opt/python/cp37-cp37m/bin/python setup.py build_ext -j$CORES
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
auditwheel repair dist/raysect-0.7.1-cp37-cp37m-linux_x86_64.whl --plat $PLAT
auditwheel repair dist/raysect-$VERSION-cp37-cp37m-linux_x86_64.whl --plat $PLAT

# python 3.8
/opt/python/cp38-cp38/bin/python -m pip install cython numpy==1.17.5
/opt/python/cp38-cp38/bin/python setup.py build_ext -j$CORES
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel
auditwheel repair dist/raysect-0.7.1-cp38-cp38-linux_x86_64.whl --plat $PLAT
auditwheel repair dist/raysect-$VERSION-cp38-cp38-linux_x86_64.whl --plat $PLAT

# python 3.9
/opt/python/cp39-cp39/bin/python -m pip install cython numpy==1.19.5
/opt/python/cp39-cp39/bin/python setup.py build_ext -j$CORES
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel
auditwheel repair dist/raysect-0.7.1-cp39-cp39-linux_x86_64.whl --plat $PLAT
auditwheel repair dist/raysect-$VERSION-cp39-cp39-linux_x86_64.whl --plat $PLAT

# python 3.10
/opt/python/cp310-cp310/bin/python -m pip install cython numpy==1.19.5
/opt/python/cp310-cp310/bin/python setup.py build_ext -j$CORES
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel
auditwheel repair dist/raysect-$VERSION-cp310-cp310-linux_x86_64.whl --plat $PLAT
8 changes: 4 additions & 4 deletions dev/notes/building_bdist_with_manylinux.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ Create a temporary folder, enter it and clone the new release:

Start the manylinux docker container (this will download the container, mount the current folder as "io", and start an interactive session):

sudo docker run -ti -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /bin/bash
sudo docker run -ti -v $(pwd):/io quay.io/pypa/manylinux2010_x86_64 /bin/bash

This will drop you into the manylinux container terminal. The /opt/python folder in the container holds the various versions of python. This example targets python 3.7. Adjust the paths as appropriate to build bdists for different python versions.

cd io/source
/opt/python/cp37-cp37m/bin/python -m pip install cython numpy==1.14.6
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel
auditwheel repair dist/raysect-0.7.1-cp37-cp37m-linux_x86_64.whl --plat manylinux1_x86_64
auditwheel repair dist/raysect-0.8.1-cp37-cp37m-linux_x86_64.whl --plat manylinux2010_x86_64

This will compile the wheel and repair any library references to produce the manylinux wheel files in a folder ./wheelhouse. e.g. raysect-0.7.1-cp37-cp37m-manylinux1_x86_64.whl and raysect-0.6.0-cp37-cp37m-manylinux2010_x86_64.whl.
This will compile the wheel and repair any library references to produce the manylinux wheel files in a folder ./wheelhouse. e.g. raysect-0.8.1-cp37-cp37m-manylinux1_x86_64.whl and raysect-0.8.1-cp37-cp37m-manylinux2010_x86_64.whl.

These can then be uploaded to pypi (just the manylinux1 packages for now).
These can then be uploaded to pypi (just the manylinux2010 packages for now).

For more info see:
https://realpython.com/python-wheels/#building-a-platform-wheel-macos-and-windows
Expand Down

0 comments on commit ea5bc96

Please sign in to comment.