File: noxfile.py

package info (click to toggle)
pytest-cython 0.3.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 228 kB
  • sloc: python: 335; cpp: 6; ansic: 6; makefile: 5
file content (43 lines) | stat: -rw-r--r-- 1,174 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import nox


@nox.session()
def lint(session):
    session.install("flake8")
    session.run("flake8", "src", "tests", "setup.py", "noxfile.py", "docs/conf.py")


@nox.session()
def check(session):
    session.install("build")
    session.install("twine")
    session.install("wheel")
    session.install("check-manifest")

    session.run("check-manifest")
    session.run("python", "-m", "build")
    session.run("twine", "check", "dist/*.*")


@nox.session
@nox.parametrize('python', ["3.10", "3.11", "3.12"])
@nox.parametrize('pytest', ["8"])
@nox.parametrize('cython', ["0.29", "3"])
def test(session, pytest, cython):
    session.install("--upgrade", "setuptools")

    session.install(f"pytest=={pytest}.*")
    session.install(f"cython=={cython}.*")
    session.install("-e", ".")

    session.run("pytest", "-vv", "tests", "src")


@nox.session()
def docs(session):
    session.install("-r", "docs/requirements.txt")
    session.install("-e", ".")

    session.run("sphinx-build", "-b", "spelling", "docs", "dist/docs")
    session.run("sphinx-build", "-b", "linkcheck", "docs", "dist/docs")
    session.run("sphinx-build", "-E", "-b", "html", "docs", "dist/docs")