Skip to content

Commit

Permalink
enable automatic distribution to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
bwinkel committed Jul 12, 2017
1 parent 2349848 commit 8aa9838
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .travis.yml
Expand Up @@ -74,6 +74,12 @@ matrix:
fast_finish: true

include:

# Standard linux; also used for sdist'ing
- os: linux
env: SETUP_CMD='test'
DO_DIST=YES

# Try MacOS X
- os: osx
osx_image: xcode8.3
Expand Down Expand Up @@ -152,3 +158,12 @@ after_success:
# If coveralls.io is set up for this package, uncomment the line below.
# The coveragerc file may be customized as needed for your package.
- if [[ $SETUP_CMD == *coverage* ]]; then coveralls --rcfile='pycraf/tests/coveragerc'; fi

- echo "TRAVIS_TAG" $TRAVIS_TAG
- echo "DO_DIST" $DO_DIST
- |
if [[ $TRAVIS_TAG && $DO_DIST]]; then
conda install twine
python setup.py sdist
python -m twine upload dist/*.tar.gz
fi
13 changes: 13 additions & 0 deletions appveyor.yml
Expand Up @@ -50,3 +50,16 @@ build: false

test_script:
- "%CMD_IN_ENV% python setup.py test"

after_test:
# This step builds your wheels.
- "%CMD_IN_ENV% python setup.py bdist_wheel"
- "%CMD_IN_ENV% python setup.py bdist_wininst"
- "%CMD_IN_ENV% python setup.py bdist_msi"

on_success:
# You can use this step to upload your artifacts to a public website.
# See Appveyor's documentation for more details. Or you can simply
# access your wheels from the Appveyor "artifacts" tab for your build.
# APPVEYOR_REPO_TAG is true only if commit is a tag
- ps: "If ($env:APPVEYOR_REPO_TAG -eq \"true\") {\n conda install twine\n python -m twine upload (resolve-path dist\\*.whl)\n }"

0 comments on commit 8aa9838

Please sign in to comment.