Update deployment config.
parent
c05df29b3b
commit
cfe0c75f30
88
.travis.yml
88
.travis.yml
|
@ -1,4 +1,4 @@
|
||||||
language: c
|
language: python
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -6,19 +6,21 @@ matrix:
|
||||||
- os: linux
|
- os: linux
|
||||||
sudo: required
|
sudo: required
|
||||||
dist: trusty
|
dist: trusty
|
||||||
|
language: c
|
||||||
|
install:
|
||||||
|
- ./.travis/install-debian.sh
|
||||||
|
script:
|
||||||
|
- ./.travis/build-debian.sh
|
||||||
|
|
||||||
- os: osx
|
- os: osx
|
||||||
osx_image: xcode8.2
|
osx_image: xcode8.3
|
||||||
|
language: c
|
||||||
install:
|
install:
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/install-debian.sh; fi
|
- ./.travis/install-macos.sh
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/install-macos.sh; fi
|
script:
|
||||||
script:
|
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./.travis/build-debian.sh; fi
|
|
||||||
# the awk command is a workaround for https://github.com/travis-ci/travis-ci/issues/4704.
|
# the awk command is a workaround for https://github.com/travis-ci/travis-ci/issues/4704.
|
||||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./.travis/build-macos.sh | awk '/.{0,32}/ {print $0}'; fi
|
- ./.travis/build-macos.sh | awk '/.{0,32}/ {print $0}'
|
||||||
|
deploy:
|
||||||
deploy:
|
|
||||||
- provider: releases
|
- provider: releases
|
||||||
api_key:
|
api_key:
|
||||||
secure: dDlkIawHcODlW9B/20/cQCtzeoocvs0hKuNngRKXKqzXLWTRq33oq/B7+39tAixWbmv6exTpijiKrRNFiSCW5Z4iwHLwaRD4XJznxw63e/Hus/dxg2Tvqx7XFpkCz8mT1Z+gZQE5YxAngeZPpI/sZbZtF1UO3yH5eLeeokZ15p26ZskQUPoYuzrTgTzYL3XfpG3F+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oco9MUqp2twv3KreR2+8Q12PDaAhfQVNEGdF3wTm1sShImjCN4VN3eSLlBEbve1QRQXM=
|
||||||
|
@ -27,4 +29,66 @@ deploy:
|
||||||
on:
|
on:
|
||||||
repo: solvespace/solvespace
|
repo: solvespace/solvespace
|
||||||
tags: true
|
tags: true
|
||||||
condition: "$TRAVIS_OS_NAME == osx"
|
|
||||||
|
- &linux
|
||||||
|
os: linux
|
||||||
|
sudo: required
|
||||||
|
dist: xenial
|
||||||
|
python: "3.6"
|
||||||
|
install: &python-install
|
||||||
|
- cd cython && python3 -m pip install -r requirements.txt && cd -
|
||||||
|
script: &python-script
|
||||||
|
- cd cython && python3 setup.py test && cd -
|
||||||
|
deploy:
|
||||||
|
provider: pypi
|
||||||
|
user: $TWINE_USERNAME
|
||||||
|
password: $TWINE_PASSWORD
|
||||||
|
skip_cleanup: true
|
||||||
|
skip_existing: true
|
||||||
|
file: cython/dist/*.whl
|
||||||
|
on:
|
||||||
|
repo: KmolYuan/solvespace
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
- <<: *linux
|
||||||
|
python: "3.7"
|
||||||
|
|
||||||
|
- <<: *linux
|
||||||
|
python: "3.8-dev"
|
||||||
|
|
||||||
|
- &osx
|
||||||
|
os: osx
|
||||||
|
osx_image: xcode10
|
||||||
|
language: generic
|
||||||
|
env: PYTHON=3.6.0
|
||||||
|
before_install:
|
||||||
|
- brew update
|
||||||
|
- brew upgrade pyenv
|
||||||
|
- export PATH="/Users/travis/.pyenv/shims:${PATH}"
|
||||||
|
- pyenv install ${PYTHON}
|
||||||
|
- pyenv global ${PYTHON}
|
||||||
|
- python3 -m pip install pip -U
|
||||||
|
- python3 --version
|
||||||
|
- python3 -m pip --version
|
||||||
|
install: *python-install
|
||||||
|
script: *python-script
|
||||||
|
after_success:
|
||||||
|
# PyPI deployment
|
||||||
|
- if [ -n "$TRAVIS_TAG" ]; then
|
||||||
|
python3 -m pip install twine;
|
||||||
|
python3 setup.py sdist bdist_wheel;
|
||||||
|
python3 -m twine upload cython/dist/*.whl --skip-existing;
|
||||||
|
fi
|
||||||
|
|
||||||
|
- <<: *osx
|
||||||
|
env: PYTHON=3.7.0
|
||||||
|
|
||||||
|
- <<: *osx
|
||||||
|
env: PYTHON=3.8-dev
|
||||||
|
|
||||||
|
before_cache:
|
||||||
|
- rm -rf $HOME/.cache/pip/log
|
||||||
|
|
||||||
|
cache:
|
||||||
|
directories:
|
||||||
|
- $HOME/.cache/pip
|
||||||
|
|
|
@ -30,4 +30,5 @@ deploy:
|
||||||
description: ""
|
description: ""
|
||||||
artifact: solvespace.exe,solvespace-cli.exe,solvespace.pdb
|
artifact: solvespace.exe,solvespace-cli.exe,solvespace.pdb
|
||||||
on:
|
on:
|
||||||
appveyor_repo_tag: true
|
APPVEYOR_REPO_NAME: solvespace/solvespace
|
||||||
|
APPVEYOR_REPO_TAG: true
|
||||||
|
|
|
@ -8,6 +8,7 @@ __author__ = "Yuan Chang"
|
||||||
__copyright__ = "Copyright (C) 2016-2019"
|
__copyright__ = "Copyright (C) 2016-2019"
|
||||||
__license__ = "GPLv3+"
|
__license__ = "GPLv3+"
|
||||||
__email__ = "pyslvs@gmail.com"
|
__email__ = "pyslvs@gmail.com"
|
||||||
|
__version__ = "3.0.0"
|
||||||
|
|
||||||
from .slvs import (
|
from .slvs import (
|
||||||
quaternion_u,
|
quaternion_u,
|
||||||
|
|
|
@ -39,12 +39,10 @@ def read(*parts):
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
||||||
|
|
||||||
def get_version(*file_paths):
|
def find_version(*file_paths):
|
||||||
doc = read(*file_paths)
|
m = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", read(*file_paths), re.M)
|
||||||
m1 = re.search(r"^set\(solvespace_VERSION_MAJOR (\d)\)", doc, re.M)
|
if m:
|
||||||
m2 = re.search(r"^set\(solvespace_VERSION_MINOR (\d)\)", doc, re.M)
|
return m.group(1)
|
||||||
if m1 and m2:
|
|
||||||
return f"{m1.group(1)}.{m2.group(1)}"
|
|
||||||
raise RuntimeError("Unable to find version string.")
|
raise RuntimeError("Unable to find version string.")
|
||||||
|
|
||||||
|
|
||||||
|
@ -110,7 +108,7 @@ class Build(build_ext):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="python_solvespace",
|
name="python_solvespace",
|
||||||
version=get_version('..', 'CMakeLists.txt'),
|
version=find_version('python_solvespace', '__init__.py'),
|
||||||
author=__author__,
|
author=__author__,
|
||||||
author_email=__email__,
|
author_email=__email__,
|
||||||
description="Python library of Solvespace",
|
description="Python library of Solvespace",
|
||||||
|
|
Loading…
Reference in New Issue