-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e7b212
commit cdf47a4
Showing
7 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/dist/ | ||
!/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
.PHONY: all | ||
all: | ||
cd build && ./build.sh | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
This directory contains the build stuff needed to build and test manylinux2014 | ||
wheels for distribution through PyPI. | ||
|
||
You need docker to do this, then you can just run `make` to build. The wheels | ||
will end up in the `dist` folder, and will then be tested in a different | ||
container (also based on manylinux) for all Python versions. Note that | ||
qxelarator, libqasm, and qisa-assembler are NOT installed in the test | ||
container, so a bunch of tests are skipped; this can't really be avoided until | ||
they're appropriately built and published to PyPI as well. Otherwise we'd have | ||
to replicate that entire process for just the test container, which is insane. | ||
|
||
You need to `make clean` manually when any of the sources (other than tests) | ||
change; there is no dependency detection. | ||
|
||
manylinux2014 is used rather than the more compatible versions because OpenQL | ||
refuses to build on manylinux2010, and I didn't bother trying manylinux1. | ||
Apparently we're hitting some weird compiler bug on 2010 where two symbols just | ||
go missing somewhere in the linking process. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Manylinux version to use. | ||
ARG MANYLINUX=2014 | ||
FROM quay.io/pypa/manylinux${MANYLINUX}_x86_64 | ||
|
||
# Max number of parallel processes to use. | ||
ARG NPROCS=100 | ||
ENV NPROCS ${NPROCS} | ||
|
||
# Install auditwheel. | ||
ARG PYTHON_VERSION=38 | ||
ENV PYBIN /opt/python/cp${PYTHON_VERSION}-cp${PYTHON_VERSION}*/bin | ||
RUN ${PYBIN}/pip3 install -U pip auditwheel | ||
|
||
WORKDIR /src | ||
|
||
ADD . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
rm -rf ../dist | ||
mkdir -p ../dist | ||
docker build --pull -t gerbertools-manylinux ../../.. -f Dockerfile | ||
docker run -v `pwd`/../dist:/io/dist gerbertools-manylinux python/manylinux/build/helper.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [[ -z "$AUDITWHEEL_PLAT" ]]; then | ||
echo "This should only be run inside the container!" | ||
exit 1 | ||
fi | ||
|
||
set -u | ||
set -x | ||
|
||
for PYDIR in /opt/python/cp3*; do | ||
rm -rf pybuild/cbuild/python pybuild/dist | ||
"${PYDIR}/bin/python" setup.py bdist_wheel | ||
${PYBIN}/python -m auditwheel repair -w /io/dist pybuild/dist/*.whl | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters