Skip to content

Commit 634510b

Browse files
authored
add tox.ini and update build/test requirements (#329)
1 parent f098efb commit 634510b

File tree

7 files changed

+80
-6
lines changed

7 files changed

+80
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ pyslurm.egg-info
4040
# IDE files
4141
.vscode
4242
.idea
43+
44+
.python-version
45+
.tox

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pyslurm is the Python client library for the [Slurm Workload Manager](https://sl
66

77
* [Slurm](https://slurm.schedmd.com) - Slurm shared library and header files
88
* [Python](https://www.python.org) - >= 3.6
9-
* [Cython](https://cython.org) - >= 0.29.30 but < 3.0
9+
* [Cython](https://cython.org) - >= 0.29.36
1010

1111
This Version is for Slurm 23.02.x
1212

build_requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
setuptools>=59.2.0
2+
wheel>=0.37.0
3+
Cython>=0.29.36
4+
packaging>=21.3

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
requires = [
44
"setuptools>=59.2.0",
55
"wheel>=0.37.0",
6-
"Cython>=0.29.30",
6+
"Cython>=0.29.36",
77
"packaging>=21.3"
88
]
99

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from setuptools._vendor.packaging.version import Version
1515

1616

17-
CYTHON_VERSION_MIN = "0.29.30" # Keep in sync with pyproject.toml
17+
CYTHON_VERSION_MIN = "0.29.36" # Keep in sync with pyproject.toml
1818
SLURM_LIB = "libslurm"
1919
TOPDIR = Path(__file__).parent
2020
PYTHON_MIN_REQUIRED = (3, 6)

test_requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
cython>=0.29.30,<3.0
2-
wheel==0.37.0
3-
setuptools==59.2.0
41
pytest==7.1.2
2+
setuptools>=59.2.0
3+
wheel>=0.37.0
4+
Cython>=0.29.36
5+
packaging>=21.3

tox.ini

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[tox]
2+
skip_missing_interpreters=True
3+
envlist =
4+
py36
5+
py37
6+
py38
7+
py39
8+
py310
9+
py311
10+
py312
11+
12+
13+
[env]
14+
passenv =
15+
SLURM_LIB_DIR
16+
SLURM_INCLUDE_DIR
17+
SLURM_BUILD_JOBS
18+
19+
20+
[testenv]
21+
labels = test
22+
deps = -r{toxinidir}/test_requirements.txt
23+
passenv = {[env]passenv}
24+
skip_install = true
25+
commands =
26+
{envpython} -V
27+
cython -V
28+
{envpython} {toxinidir}/setup.py build -j {env:SLURM_BUILD_JOBS:4}
29+
{envpython} {toxinidir}/setup.py install
30+
pytest tests/unit
31+
32+
33+
[testenv:build-cy3x]
34+
labels = build,cy3x
35+
deps = -r{toxinidir}/build_requirements.txt
36+
skip_install = true
37+
passenv = {[env]passenv}
38+
commands =
39+
{envpython} -V
40+
cython -V
41+
{envpython} {toxinidir}/setup.py build -j {env:SLURM_BUILD_JOBS:4}
42+
43+
44+
[testenv:build-cy29]
45+
labels = build,cy29
46+
deps =
47+
-r{toxinidir}/build_requirements.txt
48+
Cython == 0.29.36
49+
passenv = {[env]passenv}
50+
skip_install = true
51+
commands =
52+
{envpython} -V
53+
cython -V
54+
{envpython} {toxinidir}/setup.py build -j {env:SLURM_BUILD_JOBS:4}
55+
56+
57+
[testenv:integration]
58+
labels = test,integration
59+
skip_install = true
60+
passenv = {[env]passenv}
61+
commands =
62+
{envpython} -V
63+
cython -V
64+
{envpython} {toxinidir}/setup.py build -j {env:SLURM_BUILD_JOBS:4}
65+
{envpython} {toxinidir}/setup.py install
66+
pytest tests/integration

0 commit comments

Comments
 (0)