Skip to content

Commit

Permalink
Publish sdist once
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jun 27, 2019
1 parent a534b4e commit 001a51a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["konstin <[email protected]>"]
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"
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 6 additions & 10 deletions ci/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 001a51a

Please sign in to comment.