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 PowerPC #33

Merged
merged 1 commit into from
Jun 7, 2023
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
2 changes: 2 additions & 0 deletions .cargo/config_powerpc64le-unknown-linux-gnu.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[patch.crates-io]
ring = { git = 'https://github.com/IBM/ring.git', branch = 'ppc-0.16.20' }
22 changes: 15 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ jobs:
- target: i686-unknown-linux-gnu
os: ubuntu-22.04
cross: true
- target: powerpc64le-unknown-linux-gnu
os: ubuntu-22.04
cross: true
# Windows
- target: x86_64-pc-windows-msvc
os: windows-2022
Expand Down Expand Up @@ -75,11 +78,6 @@ jobs:
if: matrix.job.validate
run: python scripts/validate_options.py

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}

- name: Set up cross compiling
if: matrix.job.cross
uses: taiki-e/install-action@v2
Expand All @@ -90,8 +88,18 @@ jobs:
if: matrix.job.cross
run: echo "CARGO=cross" >> $GITHUB_ENV

- name: Set up tooling
run: rustup component add clippy rustfmt
- name: Configure target
run: |-
config_file=".cargo/config_${{ matrix.job.target }}.toml"
if [[ -f "$config_file" ]]; then
mv "$config_file" .cargo/config.toml
fi

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.job.target }}
components: clippy, rustfmt

- name: Lint
run: $CARGO clippy --no-deps
Expand Down
6 changes: 3 additions & 3 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const KNOWN_DISTRIBUTION_FORMATS: &[&str] = &["tar|gzip", "tar|zstd", "zip"];
const DEFAULT_CPYTHON_DISTRIBUTIONS: &[(&str, &str, &str, &str, &str, &str)] = &[
("3.11", "linux", "aarch64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-aarch64-unknown-linux-gnu-install_only.tar.gz"),
("3.11", "linux", "ppc64le", "gnu", "",
("3.11", "linux", "powerpc64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-ppc64le-unknown-linux-gnu-install_only.tar.gz"),
("3.11", "linux", "x86", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-i686-unknown-linux-gnu-install_only.tar.gz"),
Expand Down Expand Up @@ -58,7 +58,7 @@ const DEFAULT_CPYTHON_DISTRIBUTIONS: &[(&str, &str, &str, &str, &str, &str)] = &
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.11.3%2B20230507-x86_64-apple-darwin-install_only.tar.gz"),
("3.10", "linux", "aarch64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-aarch64-unknown-linux-gnu-install_only.tar.gz"),
("3.10", "linux", "ppc64le", "gnu", "",
("3.10", "linux", "powerpc64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-ppc64le-unknown-linux-gnu-install_only.tar.gz"),
("3.10", "linux", "x86", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-i686-unknown-linux-gnu-install_only.tar.gz"),
Expand Down Expand Up @@ -92,7 +92,7 @@ const DEFAULT_CPYTHON_DISTRIBUTIONS: &[(&str, &str, &str, &str, &str, &str)] = &
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.10.11%2B20230507-x86_64-apple-darwin-install_only.tar.gz"),
("3.9", "linux", "aarch64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-aarch64-unknown-linux-gnu-install_only.tar.gz"),
("3.9", "linux", "ppc64le", "gnu", "",
("3.9", "linux", "powerpc64", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-ppc64le-unknown-linux-gnu-install_only.tar.gz"),
("3.9", "linux", "x86", "gnu", "",
"https://github.com/indygreg/python-build-standalone/releases/download/20230507/cpython-3.9.16%2B20230507-i686-unknown-linux-gnu-install_only.tar.gz"),
Expand Down
4 changes: 4 additions & 0 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,7 @@ Specific versions may be chosen with the `--version` flag.
Configuration for [cross](https://github.com/cross-rs/cross) is validated by CI to ensure all known environment variable options are passed through to the containers.

When embedding the [project](config.md#project-embedding) or the [distribution](config.md#distribution-embedding) using a local path, you must use the [local repository](#local-repository) way of building and ensure that the configured files to embed reside within the repository and the options refer to relative paths.

## Caveats

Some targets like `powerpc64le-unknown-linux-gnu` need extra Cargo configuration to build properly. If there exists a file named `.cargo/config_<TARGET>.toml`, then you will need to build using the [local repository](#local-repository) way and rename that file to `.cargo/config.toml` before builds.
4 changes: 4 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Add the ability to externally manage pip with the `PYAPP_PIP_EXTERNAL` and `PYAPP_PIP_VERSION` options
- Allow for project installation with a dependency file using the `PYAPP_PROJECT_DEPENDENCY_FILE` option

***Fixed:***

- Fix builds for PowerPC64

## 0.7.0 - 2023-05-24

***Changed:***
Expand Down