-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from abravalheri/change-examples
Change examples in accordance to review comments in #348
- Loading branch information
Showing
56 changed files
with
556 additions
and
489 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 |
---|---|---|
|
@@ -120,8 +120,8 @@ jobs: | |
PYO3_CROSS_LIB_DIR: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib | ||
run: | | ||
cd examples/namespace_package | ||
pip install wheel | ||
python setup.py bdist_wheel | ||
pip install build wheel | ||
python -m build --no-isolation | ||
ls -l dist/ | ||
pip install --force-reinstall dist/namespace_package*_universal2.whl | ||
cd - | ||
|
@@ -159,16 +159,18 @@ jobs: | |
|
||
- name: Build an abi3 wheel | ||
shell: bash | ||
env: | ||
# https://github.com/actions/setup-python/issues/26 | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
DIST_EXTRA_CONFIG: /tmp/build-opts.cfg | ||
run: | | ||
set -e | ||
cd examples/rust_with_cffi/ | ||
python --version | ||
pip install -U wheel | ||
python setup.py bdist_wheel --py-limited-api=cp39 | ||
pip install -U build cffi wheel | ||
echo -e "[bdist_wheel]\npy_limited_api=cp39" > $DIST_EXTRA_CONFIG | ||
python -m build --no-isolation | ||
ls -la dist/ | ||
env: | ||
# https://github.com/actions/setup-python/issues/26 | ||
MACOSX_DEPLOYMENT_TARGET: 10.9 | ||
# Now we switch to a differnet Python version and ensure we can install | ||
# the wheel we just built. | ||
|
@@ -222,12 +224,20 @@ jobs: | |
python3.9 -m pip install crossenv | ||
python3.9 -m crossenv "/opt/python/cp39-cp39/bin/python3" --cc $TARGET_CC --cxx $TARGET_CXX --sysroot $TARGET_SYSROOT --env LIBRARY_PATH= --manylinux manylinux1 venv | ||
. venv/bin/activate | ||
build-pip install cffi wheel "setuptools>=62.4" | ||
build-pip install -U pip>=23.2.1 setuptools>=68.0.0 wheel>=0.41.1 | ||
cross-pip install -U pip>=23.2.1 setuptools>=68.0.0 wheel>=0.41.1 | ||
build-pip install cffi | ||
cross-expose cffi | ||
pip install wheel | ||
pip install -e ../../ | ||
python setup.py bdist_wheel --py-limited-api=cp37 | ||
cross-pip install -e ../../ | ||
cross-pip list | ||
export DIST_EXTRA_CONFIG=/tmp/build-opts.cfg | ||
echo -e "[bdist_wheel]\npy_limited_api=cp37" > $DIST_EXTRA_CONFIG | ||
cross-pip wheel --no-build-isolation --no-deps --wheel-dir dist . | ||
ls -la dist/ | ||
python -m zipfile -l dist/*.whl # debug all files inside wheel file | ||
' > build-wheels.sh | ||
docker run --rm -v "$PWD":/io -w /io messense/manylinux2014-cross:${{ matrix.platform.arch }} bash build-wheels.sh | ||
|
@@ -269,12 +279,15 @@ jobs: | |
CARGO: cross | ||
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu | ||
PYO3_CROSS_LIB_DIR: /opt/python/cp38-cp38/lib | ||
DIST_EXTRA_CONFIG: /tmp/build-opts.cfg | ||
run: | | ||
cd examples/namespace_package | ||
docker build -t cross-pyo3:aarch64-unknown-linux-gnu . | ||
python -m pip install wheel | ||
python setup.py bdist_wheel --plat-name manylinux2014_aarch64 | ||
python -m pip install build wheel | ||
echo -e "[bdist_wheel]\nplat_name=manylinux2014_aarch64" > $DIST_EXTRA_CONFIG | ||
python -m build --no-isolation | ||
ls -la dist/ | ||
unzip -l dist/*.whl # debug all files inside wheel file | ||
- uses: uraimo/[email protected] | ||
name: Install built wheel | ||
with: | ||
|
@@ -313,13 +326,16 @@ jobs: | |
CARGO: cargo-zigbuild | ||
CARGO_BUILD_TARGET: aarch64-unknown-linux-gnu | ||
PYO3_CROSS_LIB_DIR: /opt/python/cp38-cp38/lib | ||
DIST_EXTRA_CONFIG: /tmp/build-opts.cfg | ||
run: | | ||
mkdir -p $PYO3_CROSS_LIB_DIR | ||
docker cp -L $(docker create --rm quay.io/pypa/manylinux2014_aarch64:latest):/opt/python/cp38-cp38 /opt/python | ||
cd examples/namespace_package | ||
python -m pip install wheel | ||
python setup.py bdist_wheel --plat-name manylinux2014_aarch64 | ||
python -m pip install build wheel | ||
echo -e "[bdist_wheel]\nplat_name=manylinux2014_aarch64" > $DIST_EXTRA_CONFIG | ||
python -m build --no-isolation | ||
ls -la dist/ | ||
unzip -l dist/*.whl # debug all files inside wheel file | ||
- uses: uraimo/[email protected] | ||
name: Install built wheel | ||
with: | ||
|
@@ -346,9 +362,15 @@ jobs: | |
- uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: cp39-* | ||
CIBW_BEFORE_BUILD: pip install -e . | ||
CIBW_BEFORE_BUILD: pip install -U 'pip>=23.2.1' 'setuptools>=68.0.0' 'wheel<=0.37.1' && pip install -e . && pip list | ||
# ^-- cap on `wheel` is a workaround for pypa/auditwheel#436 | ||
# setuptools needs to be upgraded before installing setuptools-rust | ||
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64" | ||
CIBW_BUILD_VERBOSITY: 1 | ||
CIBW_BUILD_VERBOSITY: 3 | ||
CIBW_BUILD_FRONTEND: pip # pip allows disabling isolation via env var | ||
CIBW_ENVIRONMENT: PIP_NO_BUILD_ISOLATION=false | ||
# ^-- necessary to use working copy of setuptools-rust, | ||
# (however PIP_NO_BUILD_ISOLATION is counter-intuitive: see pypa/pip#5735) | ||
with: | ||
package-dir: examples/namespace_package | ||
|
||
|
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.