From 001a51a81dbbeee8935a832c28cb91194915a01b Mon Sep 17 00:00:00 2001 From: konstin Date: Thu, 27 Jun 2019 23:58:02 +0200 Subject: [PATCH] Publish sdist once --- Cargo.lock | 2 +- Cargo.toml | 2 +- appveyor.yml | 2 +- ci/before_deploy.sh | 16 ++++++---------- 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 63030efa1..2ec5b9b17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1107,7 +1107,7 @@ dependencies = [ [[package]] name = "pyo3-pack" -version = "0.7.0-beta.3" +version = "0.7.0-beta.4" dependencies = [ "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", "cargo_metadata 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 0cd38e72f..1607cb863 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["konstin "] name = "pyo3-pack" -version = "0.7.0-beta.3" +version = "0.7.0-beta.4" description = "Build and publish crates with pyo3, rust-cpython and cffi bindings as well as rust binaries as python packages" exclude = ["test-crates/**/*", "sysconfig/*", "test-data/*", "ci/*", "tests/*"] readme = "Readme.md" diff --git a/appveyor.yml b/appveyor.yml index 6c927cce4..46dc23ca6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -67,7 +67,7 @@ before_deploy: - appveyor PushArtifact ../../%APPVEYOR_PROJECT_SLUG%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip - cd ../.. # Publish pypi - - cargo run -- publish -b bin -u konstin + - cargo run -- publish -b bin -u konstin --no-sdist deploy: diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh index 1736bb66e..9378f8554 100755 --- a/ci/before_deploy.sh +++ b/ci/before_deploy.sh @@ -2,16 +2,9 @@ # Based on https://github.com/sharkdp/hyperfine/blob/master/ci/before_deploy.bash set -ex -# The CFLAGS="-fno-stack-protector" story is a weird one; On 32 bit, you get errors such as the following without the option -# /usr/bin/ld: apps/openssl: hidden symbol `__stack_chk_fail_local' isn't defined -# I assume that this is a musl bug fixed in 2015 that didn't make into ubuntu 14.04, but that special -# case seems to be documented nowhere else: -# http://git.musl-libc.org/cgit/musl/commit/?id=55d061f031085f24d138664c897791aebe9a2fab -# We can't have a more recent musl on 14.04 (there's no ppa), so we have to disable that feature - make_archive() { # We don't care for manylinux compliance for the downloads, so we can use the keyring. - CFLAGS="-fno-stack-protector" cargo build --release --target $TARGET --features "password-storage" + cargo build --release --target $TARGET --features "password-storage" pushd target/$TARGET/release/ # You can add more files to the archive by adding them to this line tar czf $TRAVIS_BUILD_DIR/$BINARY_NAME-$TRAVIS_TAG-$TARGET.tar.gz $BINARY_NAME @@ -75,8 +68,11 @@ EOF } upload_to_pypi() { - # We do care for manylinux compliance for pypi, so we use the musl feature to get static binaries - CFLAGS="-fno-stack-protector" cargo run -- publish -u konstin -b bin --target $TARGET + if [[ $TARGET = x86_64-unknown-linux-musl ]]; then + cargo run -- publish -u konstin -b bin --target $TARGET + else + cargo run -- publish -u konstin -b bin --target $TARGET --no-sdist + fi } main() {