Skip to content

Commit

Permalink
Merge pull request #646 from messense/fix-cp310-cross
Browse files Browse the repository at this point in the history
Fix cross compilation for Python 3.10
  • Loading branch information
messense authored Oct 13, 2021
2 parents fc7fddb + 97065c7 commit 761f05a
Show file tree
Hide file tree
Showing 10 changed files with 211 additions and 205 deletions.
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

0 comments on commit 761f05a

Please sign in to comment.