Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cross compilation for Python 3.10 #646

Merged
merged 3 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -201,19 +201,24 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [
{ target: "aarch64-unknown-linux-gnu", arch: "aarch64" },
{ target: "armv7-unknown-linux-gnueabihf", arch: "armv7" },
{ target: "s390x-unknown-linux-gnu", arch: "s390x" },
]
platform:
- target: aarch64-unknown-linux-gnu
arch: aarch64
abi: cp36-cp36m
- target: armv7-unknown-linux-gnueabihf
arch: armv7
abi: cp39-cp39
# - target: s390x-unknown-linux-gnu
# arch: s390x
# abi: cp310-cp310
steps:
- uses: actions/checkout@v2
- name: Build Wheels
run: |
echo 'curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal
source ~/.cargo/env
rustup target add ${{ matrix.platform.target }}
export PYO3_CROSS_LIB_DIR=/opt/python/cp36-cp36m/lib
export PYO3_CROSS_LIB_DIR=/opt/python/${{ matrix.platform.abi }}/lib
cargo run --target x86_64-unknown-linux-gnu -- build -i python3.9 --release --out dist --no-sdist --target ${{ matrix.platform.target }} -m test-crates/pyo3-mixed/Cargo.toml
' > build-wheel.sh
docker run --rm -v "$PWD":/io -w /io messense/manylinux2014-cross:${{ matrix.platform.arch }} bash build-wheel.sh
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix finding conda Python interpreters on Windows by RobertColton in [#644](https://github.com/PyO3/maturin/pull/644)
* Fix Unicode metadata when uploading to PyPI in [#645](https://github.com/PyO3/maturin/pull/645)
* Fix incorrectly folded long `Summary` metadata
* Fix cross compilation for Python 3.10 in [#646](https://github.com/PyO3/maturin/pull/646)

## [0.11.4] - 2021-09-28

Expand Down
2 changes: 1 addition & 1 deletion src/cross_compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn parse_sysconfigdata(
let mut script = fs::read_to_string(config_path)?;
script += r#"
print("version_major", build_time_vars["VERSION"][0]) # 3
print("version_minor", build_time_vars["VERSION"][2]) # E.g., 8
print("version_minor", build_time_vars["VERSION"][2:]) # E.g., 8, 10
KEYS = [
"ABIFLAGS",
"EXT_SUFFIX",
Expand Down
64 changes: 32 additions & 32 deletions test-crates/pyo3-abi3-without-version/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading