diff --git a/.cargo/config_powerpc64le-unknown-linux-gnu.toml b/.cargo/config_powerpc64le-unknown-linux-gnu.toml new file mode 100644 index 0000000..967ec58 --- /dev/null +++ b/.cargo/config_powerpc64le-unknown-linux-gnu.toml @@ -0,0 +1,2 @@ +[patch.crates-io] +ring = { git = 'https://github.com/IBM/ring.git', branch = 'ppc-0.16.20' } diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 46dbc3c..524c0ea 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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 diff --git a/build.rs b/build.rs index b264fc9..af253ec 100644 --- a/build.rs +++ b/build.rs @@ -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"), @@ -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"), @@ -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"), diff --git a/docs/build.md b/docs/build.md index 5900122..ce262e0 100644 --- a/docs/build.md +++ b/docs/build.md @@ -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_.toml`, then you will need to build using the [local repository](#local-repository) way and rename that file to `.cargo/config.toml` before builds. diff --git a/docs/changelog.md b/docs/changelog.md index 27fe4b4..7d86292 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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:***