-
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
Jordan Webb
committed
Apr 19, 2021
1 parent
1b70ac4
commit 7b62696
Showing
10 changed files
with
76 additions
and
39 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 |
---|---|---|
@@ -1,13 +1,11 @@ | ||
services: | ||
manylinux: | ||
build: | ||
context: . | ||
context: ./manylinux | ||
args: | ||
ARCH: ${ARCH:-x86_64} | ||
environment: | ||
PLAT: manylinux1_${ARCH:-x86_64} | ||
WHICH_PYTHON: ${WHICH_PYTHON:-cp36-cp36m} | ||
volumes: | ||
- ..:/mnt | ||
tmpfs: | ||
- /tmp,exec |
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
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,55 @@ | ||
#!/usr/bin/env bash | ||
# Adapted from https://github.com/pypa/python-manylinux-demo/blob/master/travis/build-wheels.sh | ||
|
||
set -euo pipefail | ||
|
||
WHICH_PYTHON=${WHICH_PYTHON:-cp36-cp36m} | ||
|
||
function repair_wheel { | ||
wheel="$1" | ||
if ! auditwheel show "$wheel"; then | ||
echo "Skipping non-platform wheel $wheel" | ||
else | ||
auditwheel repair "$wheel" --plat "$PLAT" -w /build/fixedwheel/ | ||
fi | ||
} | ||
|
||
mkdir -p /build/sdist /build/source /build/wheel /build/fixedwheel | ||
|
||
# Build and extract sdist | ||
/opt/python/cp36-cp36m/bin/python3 setup.py sdist -d /build/sdist | ||
|
||
find /build | ||
|
||
sdist=$(find /build/sdist -name '*.tar.gz' | head -n1) | ||
|
||
if [ -z "$sdist" ] ; then | ||
echo "couldn't find sdist!" >&2 | ||
exit 1 | ||
fi | ||
|
||
tar -C /build/source -xvf "$sdist" | ||
|
||
# Install development requirements | ||
"/opt/python/${WHICH_PYTHON}/bin/pip" install -r /mnt/requirements-dev.txt | ||
|
||
# Compile wheel | ||
"/opt/python/${WHICH_PYTHON}/bin/pip" wheel /build/source/"$(basename "$sdist" .tar.gz)" --no-deps -w /build/wheel | ||
|
||
# Bundle external shared libraries into the wheels | ||
for whl in /build/wheel/*.whl; do | ||
repair_wheel "$whl" | ||
done | ||
|
||
# Install packages and test | ||
cp /mnt/renameat2_test.py /bin/renameat2_test.py | ||
"/opt/python/${WHICH_PYTHON}/bin/pip" install renameat2 --no-index -f /build/fixedwheel | ||
cd / && "/opt/python/${WHICH_PYTHON}/bin/python3" -m pytest /bin/renameat2_test.py | ||
|
||
mnt_uid=$(stat -c '%u' /mnt) | ||
mnt_gid=$(stat -c '%g' /mnt) | ||
|
||
# Copy tested wheel over to dist | ||
mkdir -p /mnt/dist | ||
cp /build/fixedwheel/*.whl /mnt/dist | ||
chown -R "$mnt_uid:$mnt_gid" /mnt/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
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
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 |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
examples.md | ||
renameat2.rst | ||
|
||
|
||
Indices and tables | ||
================== | ||
|
||
|
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 |
---|---|---|
|
@@ -3,3 +3,9 @@ API documentation | |
|
||
.. automodule:: renameat2 | ||
:members: | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
:caption: Contents: | ||
|
||
examples.md |
This file was deleted.
Oops, something went wrong.
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
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