Skip to content

Commit 35499f4

Browse files
committed
chore: simpler tox.ini
1 parent bc881e4 commit 35499f4

3 files changed

Lines changed: 26 additions & 31 deletions

File tree

pyproject.toml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,17 @@ dependencies = [
3434
"hvac",
3535
"packaging",
3636
"typing-extensions>=4.5.0",
37-
"backports.strenum>=1.3.1",
37+
'backports.strenum>=1.3.1; python_version < "3.11"',
3838
]
39+
[project.optional-dependencies]
40+
dev = [
41+
"typing-inspect",
42+
"pytest",
43+
"pytest-asyncio",
44+
"Twine",
45+
"setuptools", # ?
46+
"pylxd",
47+
]
3948

4049
[project.urls]
4150
"Homepage" = "https://juju.is/docs/sdk"

setup.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,18 @@
3232
"hvac",
3333
"packaging",
3434
"typing-extensions>=4.5.0",
35-
"backports.strenum",
35+
'backports.strenum>=1.3.1; python_version < "3.11"',
3636
],
37+
extras_require={
38+
"dev": [
39+
"typing-inspect",
40+
"pytest",
41+
"pytest-asyncio",
42+
"Twine",
43+
"setuptools", # ?
44+
"pylxd",
45+
]
46+
},
3747
include_package_data=True,
3848
maintainer="Juju Ecosystem Engineering",
3949
maintainer_email="juju@lists.ubuntu.com",

tox.ini

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,15 @@ envlist = py3,py38,py39,py310,py311,docs
99
skipsdist=True
1010

1111
[testenv]
12-
usedevelop=True
13-
commands =
14-
pip install urllib3<2
15-
pip install pylxd
16-
pytest --tb native -s -k 'not integration' -m 'not serial' {posargs}
12+
use_develop = True
13+
# This should work, but doesn't. Hence the deps= below
14+
# extras = dev
15+
deps =
16+
.[dev]
1717
passenv =
1818
HOME
1919
TEST_AGENTS
2020
LXD_DIR
21-
# FIXME would it be easier to `pip install -e .`?
22-
deps =
23-
macaroonbakery
24-
toposort
25-
typing-inspect
26-
paramiko
27-
ipdb
28-
pytest
29-
pytest-asyncio
30-
Twine
31-
websockets<14.0
32-
kubernetes<31.0.0
33-
hvac
34-
packaging
35-
setuptools
36-
backports.strenum
3721

3822
[testenv:docs]
3923
deps =
@@ -47,8 +31,6 @@ commands =
4731
[testenv:integration]
4832
envdir = {toxworkdir}/py3
4933
commands =
50-
pip install urllib3<2
51-
pip install pylxd
5234
pytest \
5335
--tb native \
5436
-k 'integration' \
@@ -60,8 +42,6 @@ commands =
6042
[testenv:integration-quarantine]
6143
envdir = {toxworkdir}/py3
6244
commands =
63-
pip install urllib3<2
64-
pip install pylxd
6545
pytest \
6646
--tb native \
6747
-m 'not serial' \
@@ -72,8 +52,6 @@ commands =
7252
[testenv:unit]
7353
envdir = {toxworkdir}/py3
7454
commands =
75-
pip install urllib3<2
76-
pip install pylxd
7755
pytest {toxinidir}/tests/unit {posargs}
7856

7957
[testenv:serial]
@@ -82,8 +60,6 @@ commands =
8260
# it doesn't get run in CI
8361
envdir = {toxworkdir}/py3
8462
commands =
85-
pip install urllib3<2
86-
pip install pylxd
8763
pytest --tb native -s {posargs:-m 'serial'}
8864

8965
[testenv:validate]

0 commit comments

Comments
 (0)