diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4414b20c..76562c439 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -87,9 +87,9 @@ jobs: if: matrix.target == 'x86_64-unknown-linux-musl' run: | # manylinux - cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} + cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage" # musllinux - cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist --compatibility musllinux_1_1 + cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --cargo-extra-args="--features password-storage" --no-sdist --compatibility musllinux_1_1 # ring doesn't support aarch64 windows yet - name: Build wheel (windows aarch64) @@ -98,7 +98,7 @@ jobs: - name: Build wheel (without sdist) if: ${{ matrix.target != 'x86_64-unknown-linux-musl' && matrix.target != 'aarch64-pc-windows-msvc' }} - run: cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist + run: cargo run -- build --release -b bin -o dist --target ${{ matrix.target }} --no-sdist --cargo-extra-args="--features password-storage" - name: Build wheel (macOS universal2) if: matrix.target == 'x86_64-apple-darwin' @@ -109,7 +109,7 @@ jobs: # set SDKROOT for C dependencies like ring and bzip2 export SDKROOT=$(xcrun --sdk macosx --show-sdk-path) rustup target add aarch64-apple-darwin - cargo run -- build --release -b bin -o dist --no-sdist --universal2 + cargo run -- build --release -b bin -o dist --no-sdist --universal2 --cargo-extra-args="--features password-storage" - name: Archive binary (windows) if: matrix.os == 'windows-latest' @@ -173,17 +173,19 @@ jobs: CARGO_HOME: /root/.cargo steps: - uses: actions/checkout@v2 - - name: Build and publish wheel + - name: Build wheel run: | sudo python3 -m pip install maturin # manylinux maturin build --release -b bin -o dist --no-sdist \ --target ${{ matrix.platform.target }} \ - --manylinux ${{ matrix.platform.manylinux }} + --manylinux ${{ matrix.platform.manylinux }} \ + --cargo-extra-args="--features password-storage" # musllinux maturin build --release -b bin -o dist --no-sdist \ --target ${{ matrix.platform.target }} \ - --compatibility musllinux_1_1 + --compatibility musllinux_1_1 \ + --cargo-extra-args="--features password-storage" - name: Archive binary run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin - name: Upload wheel artifacts @@ -224,22 +226,22 @@ jobs: toolchain: stable override: true target: ${{ matrix.platform.target }} - - name: Build and publish manylinux wheel + - name: Build manylinux wheel run: | sudo python3 -m pip install maturin maturin build --release -b bin -o dist --no-sdist \ --target ${{ matrix.platform.target }} \ --manylinux ${{ matrix.platform.manylinux }} \ --cargo-extra-args="--no-default-features" \ - --cargo-extra-args="--features log,upload,human-panic" - - name: Build and publish musllinux wheel + --cargo-extra-args="--features log,upload,human-panic,password-storage" + - name: Build musllinux wheel if: matrix.platform.musllinux != '' run: | maturin build --release -b bin -o dist --no-sdist \ --target ${{ matrix.platform.target }} \ --compatibility ${{ matrix.platform.musllinux }} \ --cargo-extra-args="--no-default-features" \ - --cargo-extra-args="--features log,upload,human-panic" + --cargo-extra-args="--features log,upload,human-panic,password-storage" - name: Archive binary run: tar czvf target/release/maturin-${{ matrix.platform.target }}.tar.gz -C target/${{ matrix.platform.target }}/release maturin - name: Upload wheel artifacts diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1d8aefe85..112a646e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,12 +84,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: test + args: --features password-storage - name: cargo test with musl if: matrix.os == 'ubuntu-latest' uses: actions-rs/cargo@v1 with: command: test - args: --target x86_64-unknown-linux-musl + args: --features password-storage --target x86_64-unknown-linux-musl - uses: actions/setup-python@v2 with: python-version: "pypy-3.7" diff --git a/Changelog.md b/Changelog.md index 425c1d683..160fc708e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Add a `maturin init` command as a companion to `maturin new` in [#719](https://github.com/PyO3/maturin/pull/719) * Don't package non-path-dep crates in sdist for workspaces in [#720](https://github.com/PyO3/maturin/pull/720) +* Build release packages with `password-storage` feature in [#725](https://github.com/PyO3/maturin/pull/725) ## [0.12.3] - 2021-11-29 diff --git a/Dockerfile b/Dockerfile index fcf04c96a..dd26d93d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ADD . /maturin/ # Manually update the timestamps as ADD keeps the local timestamps and cargo would then believe the cache is fresh RUN touch /maturin/src/lib.rs /maturin/src/main.rs -RUN cargo rustc --bin maturin --manifest-path /maturin/Cargo.toml --release -- -C link-arg=-s \ +RUN cargo rustc --bin maturin --manifest-path /maturin/Cargo.toml --release --features password-storage -- -C link-arg=-s \ && mv /maturin/target/release/maturin /usr/bin/maturin \ && rm -rf /maturin diff --git a/Readme.md b/Readme.md index bf463bfdc..b9f32edc5 100644 --- a/Readme.md +++ b/Readme.md @@ -238,7 +238,7 @@ docker run --rm -v $(pwd):/io konstin2/maturin build --release # or other matur Note that this image is very basic and only contains python, maturin and stable rust. If you need additional tools, you can run commands inside the manylinux container. See [konstin/complex-manylinux-maturin-docker](https://github.com/konstin/complex-manylinux-maturin-docker) for a small educational example or [nanoporetech/fast-ctc-decode](https://github.com/nanoporetech/fast-ctc-decode/blob/b226ea0f2b2f4f474eff47349703d57d2ea4801b/.github/workflows/publish.yml) for a real world setup. -maturin itself is manylinux compliant when compiled for the musl target. The binaries on the release pages have additional keyring integration (through the `password-storage` feature), which is not manylinux compliant. +maturin itself is manylinux compliant when compiled for the musl target. ## PyPy