diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:19:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 20:19:53 +0000 |
commit | e7ee850d46d54789979bf0c5244bae1825fb7149 (patch) | |
tree | 6e94ed55df9ec749682a3c792ce752d07892b968 /tox.ini | |
parent | Initial commit. (diff) | |
download | python-ruyaml-e7ee850d46d54789979bf0c5244bae1825fb7149.tar.xz python-ruyaml-e7ee850d46d54789979bf0c5244bae1825fb7149.zip |
Adding upstream version 0.91.0.upstream/0.91.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tox.ini | 67 |
1 files changed, 67 insertions, 0 deletions
@@ -0,0 +1,67 @@ +[tox] +minversion = 3.16.1 +envlist = + linters + docs + packaging + py{36,37,38,39,310} +isolated_build = true +requires = + setuptools >= 41.4.0 + pip >= 19.3.0 +skip_missing_interpreters = False + +[testenv] +description = Unittest using {basepython} +commands = + /bin/bash -c 'pytest _test/test_*.py' +deps = + pytest +allowlist_externals = + make + sh + +[testenv:docs] +description = Build docs +basepython = python3.8 +deps = + --editable .[docs] +commands = + make singlehtml +changedir = {toxinidir}/_doc + +[testenv:linters] +description = Linting +basepython = python3.8 +deps = + pre-commit>=2.8.2 + flake8 + flake8-bugbear +commands = + pre-commit run -a + +[testenv:packaging] +description = + Do packaging/distribution +# `usedevelop = true` overrides `skip_install` instruction, it's unwanted +usedevelop = false +# don't install package itself in this env +skip_install = true +deps = + build >= 0.7.0 + twine >= 3.7.0 +setenv = +commands = + # build wheel and sdist using PEP-517 + {envpython} -c 'import os.path, shutil, sys; \ + dist_dir = os.path.join("{toxinidir}", "dist"); \ + os.path.isdir(dist_dir) or sys.exit(0); \ + print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \ + shutil.rmtree(dist_dir)' + {envpython} -m build \ + --outdir {toxinidir}/dist/ \ + {toxinidir} + # Validate metadata using twine + twine check --strict {toxinidir}/dist/* + # Install the wheel + sh -c "python3 -m pip install --force-reinstall {toxinidir}/dist/*.whl" |