chore: add build environment
This commit is contained in:
parent
93fdf8c789
commit
d6112ccb2c
3 changed files with 54 additions and 17 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -4,6 +4,7 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
/.tox
|
/.tox
|
||||||
*.egg-info
|
*.egg-info
|
||||||
|
/dist/
|
||||||
|
|
||||||
# FAT stuff, in a filesystem sense
|
# FAT stuff, in a filesystem sense
|
||||||
._*
|
._*
|
||||||
|
|
|
||||||
16
pyproject.toml
Normal file
16
pyproject.toml
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools",
|
||||||
|
"wheel",
|
||||||
|
"setuptools-scm[toml]"
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.autopep8]
|
||||||
|
max_line_length = 80
|
||||||
|
aggressive = 3
|
||||||
|
recursive = true
|
||||||
|
in-place = true
|
||||||
|
|
||||||
|
[tool.setuptools_scm]
|
||||||
|
|
||||||
54
tox.ini
54
tox.ini
|
|
@ -4,26 +4,46 @@ maxversion = 3.7.0
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
|
|
||||||
|
|
||||||
[testenv:docgen]
|
[testenv:lint]
|
||||||
description = HTML documentation
|
description = lint with pylint
|
||||||
basepython = python3
|
setenv = PYTHONPATH = {toxinidir}/src
|
||||||
allowlist_externals =
|
deps =
|
||||||
tox
|
{toxinidir}
|
||||||
|
pylint >= 2.12.2, < 3
|
||||||
commands =
|
commands =
|
||||||
tox -e docgen-html
|
python3 -m pylint {toxinidir}/src {posargs}
|
||||||
tox -e docgen-md
|
|
||||||
tox -e docgen-pdf
|
|
||||||
|
|
||||||
|
|
||||||
[testenv:docgen-html]
|
[testenv:format]
|
||||||
description = HTML documentation
|
description = format code
|
||||||
basepython = python3
|
basepython = python3
|
||||||
allowlist_externals =
|
deps =
|
||||||
sphinx-build
|
autopep8 >= 1.6.0, < 2
|
||||||
doxygen
|
commands =
|
||||||
|
python3 -m autopep8 -v src/ {posargs}
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:build]
|
||||||
|
description = build and package
|
||||||
|
basepython = python3
|
||||||
|
setenv = PYTHONPATH = {toxinidir}/src
|
||||||
deps =
|
deps =
|
||||||
sphinx-git
|
build >= 0.5.1, < 1
|
||||||
sphinx >= 4.3.2, < 5
|
|
||||||
urllib3 >=1.26.6, < 2
|
|
||||||
commands =
|
commands =
|
||||||
sphinx-build -d "{toxinidir}/build/docs/_tree/html" docs "build/docs/html" --color -W -bhtml {posargs}
|
python3 -m build {posargs}
|
||||||
|
|
||||||
|
|
||||||
|
[testenv:publish]
|
||||||
|
description = publish to pypi repository
|
||||||
|
passenv =
|
||||||
|
#https://twine.readthedocs.io/en/stable/#environment-variables
|
||||||
|
TWINE_USERNAME
|
||||||
|
TWINE_PASSWORD
|
||||||
|
TWINE_REPOSITORY
|
||||||
|
TWINE_REPOSITORY_URL
|
||||||
|
TWINE_CERT
|
||||||
|
TWINE_NON_INTERACTIVE
|
||||||
|
deps =
|
||||||
|
twine
|
||||||
|
commands =
|
||||||
|
python3 -m twine upload "dist/*"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue