tox: add envs to build sdist, pure/native wheels, and upload to pypi
This commit is contained in:
parent
c0a9b3689c
commit
b2410d9fe0
38
tox.ini
38
tox.ini
@ -55,3 +55,41 @@ deps = requests
|
|||||||
changedir = {toxinidir}
|
changedir = {toxinidir}
|
||||||
commands =
|
commands =
|
||||||
python tools/update_cython_shadow.py {posargs}
|
python tools/update_cython_shadow.py {posargs}
|
||||||
|
|
||||||
|
[testenv:sdist]
|
||||||
|
deps =
|
||||||
|
setuptools
|
||||||
|
cython
|
||||||
|
changedir = {toxinidir}
|
||||||
|
commands =
|
||||||
|
python -c 'import shutil; shutil.rmtree("dist", ignore_errors=True)'
|
||||||
|
python setup.py --with-cython sdist --dist-dir dist
|
||||||
|
|
||||||
|
[testenv:pure-wheel]
|
||||||
|
deps =
|
||||||
|
{[testenv:sdist]deps}
|
||||||
|
pip
|
||||||
|
wheel
|
||||||
|
setenv = CU2QU_WITH_CYTHON=0
|
||||||
|
changedir = {toxinidir}
|
||||||
|
commands =
|
||||||
|
{[testenv:sdist]commands}
|
||||||
|
pip wheel --pre --no-deps --no-cache-dir --wheel-dir dist --find-links dist \
|
||||||
|
--no-binary {[tox]package_name} {[tox]package_name}
|
||||||
|
|
||||||
|
[testenv:native-wheel]
|
||||||
|
deps = {[testenv:pure-wheel]deps}
|
||||||
|
setenv = CU2QU_WITH_CYTHON=1
|
||||||
|
changedir = {toxinidir}
|
||||||
|
commands = {[testenv:pure-wheel]commands}
|
||||||
|
|
||||||
|
; we only upload the pure cu2qu-*-py2.py3-any.whl (for now)
|
||||||
|
[testenv:pypi]
|
||||||
|
deps =
|
||||||
|
{[testenv:pure-wheel]deps}
|
||||||
|
twine
|
||||||
|
passenv = TWINE_USERNAME TWINE_PASSWORD
|
||||||
|
changedir = {toxinidir}
|
||||||
|
commands =
|
||||||
|
{[testenv:pure-wheel]commands}
|
||||||
|
twine upload dist/*.whl dist/*.zip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user