forked from canonical/pylxd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split setup.cfg into pyproject.toml and tox.ini
Note: setup.py is still needed for tox's `usedevelop = True`. Signed-off-by: Simon Deziel <[email protected]>
- Loading branch information
1 parent
b6a40ef
commit ed3328e
Showing
3 changed files
with
115 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[project] | ||
name = "pylxd" | ||
version = "2.3.2a" | ||
description = "python library for LXD" | ||
readme = "README.rst" | ||
authors = [ | ||
{name = "Paul Hummer and others (see CONTRIBUTORS.rst"}, | ||
{email = "[email protected]"}, | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Information Technology", | ||
"Intended Audience :: System Administrators", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Operating System :: POSIX :: Linux", | ||
"Programming Language :: Python :: 3", | ||
] | ||
dependencies = [ | ||
"cryptography >= 3.2", | ||
"python-dateutil >= 2.4.2", | ||
"requests >= 2.20.0", | ||
"requests-toolbelt >= 0.8.0", | ||
"requests-unixsocket >= 0.1.5", | ||
"urllib3 < 2", | ||
"ws4py != 0.3.5, >= 0.3.4", # 0.3.5 is broken for websocket support | ||
] | ||
license = {file = "LICENSE"} | ||
requires-python = ">=3.8" | ||
|
||
[project.urls] | ||
Homepage = "https://ubuntu.com/lxd" | ||
Documentation = "https://pylxd.readthedocs.io/en/latest/" | ||
Repository = "https://github.com/canonical/pylxd" | ||
|
||
[build-system] | ||
requires = ["setuptools"] | ||
|
||
[tool.setuptools] | ||
packages = ["pylxd"] | ||
|
||
[tool.mypy] | ||
ignore_missing_imports = true | ||
install_types = true | ||
non_interactive = true | ||
warn_return_any = true | ||
warn_unused_configs = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[tox] | ||
minversion = 1.6 | ||
skipsdist = True | ||
envlist = lint,check,coverage | ||
|
||
# Define dependency groups | ||
# https://tox.wiki/en/latest/config.html#substitution-for-values-from-other-sections | ||
[testing] | ||
deps = | ||
ddt >= 0.7.0 | ||
mock-services >= 0.3 | ||
pytest-cov >= 2.10.1 | ||
pytest >= 6.1.2 | ||
# mock-services is old and unmaintained. Doesn't work with newer versions | ||
# of requests-mock. Thus, we have to pin it down. | ||
requests-mock < 1.2 | ||
# Python 3.12 no longer installs `setuptools` in venv | ||
# but mock-services depends on it for `pkg_resources` | ||
setuptools | ||
|
||
[format] | ||
deps = | ||
black == 23.1.0 | ||
flake8 >= 2.5.0 | ||
isort == 5.6.4 | ||
|
||
[testenv] | ||
usedevelop = True | ||
setenv = | ||
PYLXD_WARNINGS=none | ||
deps = {[testing]deps} | ||
commands = pytest {posargs:pylxd} | ||
|
||
[testenv:integration] | ||
deps = {[testing]deps} | ||
commands = pytest integration {posargs} | ||
|
||
[testenv:integration-in-lxd] | ||
deps = {[testing]deps} | ||
commands = {toxinidir}/integration/run-integration-tests-in-lxd | ||
|
||
[testenv:migration] | ||
deps = {[testing]deps} | ||
commands = pytest migration {posargs} | ||
|
||
[testenv:format] | ||
deps = {[format]deps} | ||
commands = | ||
isort --profile black {toxinidir} | ||
black {toxinidir} | ||
|
||
[testenv:lint] | ||
deps = {[format]deps} | ||
commands = | ||
black --check {toxinidir} | ||
isort --profile black --check-only --diff {toxinidir} | ||
flake8 {toxinidir} | ||
|
||
[testenv:check] | ||
deps = mypy | ||
commands = mypy -p pylxd {posargs} | ||
|
||
[testenv:coverage] | ||
deps = {[testing]deps} | ||
commands = pytest --cov=pylxd pylxd {posargs} | ||
|
||
[flake8] | ||
show-source = True | ||
ignore = E203, E266, E501, W503, W504 | ||
exclude = .git, .tox, dist, doc, *egg, build |