Fix PyPI deployment.

pull/493/head
KmolYuan 2019-09-24 14:04:44 +08:00
parent bc674db3d3
commit 495a285c7e
1 changed files with 18 additions and 12 deletions

View File

@ -31,23 +31,29 @@ matrix:
- &linux - &linux
os: linux os: linux
sudo: required sudo: required
dist: xenial dist: bionic
language: python language: python
python: "3.6" python: "3.6"
addons:
apt:
update: true
packages:
- patchelf
install: &python-install install: &python-install
- python3 -m pip install -r cython/requirements.txt - python3 -m pip install -r cython/requirements.txt
script: &python-script script: &python-script
- cd cython && python3 setup.py test && cd - - cd cython && python3 setup.py test && cd -
before_deploy: cd cython before_deploy: cd cython
after_success: deploy:
# PyPI deployment - provider: pypi
- if [[ "$TRAVIS_REPO_SLUG" == "KmolYuan/Pyslvs-UI" && -n "$TRAVIS_TAG" ]]; then user: $TWINE_USERNAME
python3 -m pip install auditwheel twine; password: $TWINE_PASSWORD
python3 setup.py sdist bdist_wheel; skip_cleanup: true
mkdir dist-new; skip_existing: true
auditwheel repair dist/*.whl -w dist-new; distributions: sdist
python3 -m twine upload dist-new/*.whl --skip-existing; on:
fi repo: KmolYuan/solvespace
tags: true
- <<: *linux - <<: *linux
python: "3.7" python: "3.7"
@ -73,10 +79,10 @@ matrix:
script: *python-script script: *python-script
after_success: after_success:
# PyPI deployment # PyPI deployment
- if [ "$TRAVIS_REPO_SLUG" == "KmolYuan/solvespace" && -n "$TRAVIS_TAG" ]; then - if [[ "$TRAVIS_REPO_SLUG" == "KmolYuan/solvespace" && -n "$TRAVIS_TAG" ]]; then
python3 -m pip install twine; python3 -m pip install twine;
cd cython; cd cython;
python3 setup.py sdist bdist_wheel; python3 setup.py bdist_wheel;
python3 -m twine upload dist/*.whl --skip-existing; python3 -m twine upload dist/*.whl --skip-existing;
fi fi