File: tox.ini

package info (click to toggle)
python-ldap 3.4.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,756 kB
  • sloc: python: 9,558; ansic: 3,052; makefile: 139; sh: 79
file content (107 lines) | stat: -rw-r--r-- 3,088 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Tox (http://tox.testrun.org/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

[tox]
# Note: when updating Python versions, also change setup.py and .github/worlflows/*
envlist = py{36,37,38,39,310,311,312},c90-py{36,37},py3-nosasltls,doc,py3-trace,pypy3.9
minver = 1.8

[gh-actions]
python =
    3.6: py36
    3.7: py37
    3.8: py38, doc, py3-nosasltls
    3.9: py39, py3-trace
    3.10: py310
    3.11: py311
    3.12: py312
    pypy3.9: pypy3.9

[testenv]
deps =
passenv = WITH_GCOV
# - Enable BytesWarning
# - Turn all warnings into exceptions.
setenv =
    CFLAGS=-Wno-int-in-bool-context -Werror -Werror=declaration-after-statement -std=c99
commands = {envpython} -bb -Werror \
    -m unittest discover -v -s Tests -p 't_*' {posargs}

[testenv:py312]
# Python 3.12 headers are incompatible with declaration-after-statement
setenv =
    CFLAGS=-Wno-int-in-bool-context -Werror -std=c99

[testenv:py3-nosasltls]
basepython = python3
# don't install, install dependencies manually
skip_install = true
deps =
    {[testenv]deps}
    pyasn1
    pyasn1_modules
passenv = {[testenv]passenv}
setenv =
    CI_DISABLED=LDAPI:SASL:TLS
# build and install without SASL and TLS, run without LDAPI
commands =
    {envpython} setup.py clean --all
    {envpython} setup.py build_ext -UHAVE_SASL,HAVE_TLS
    {envpython} setup.py install --single-version-externally-managed --root=/
    {[testenv]commands}

[testenv:py3-trace]
basepython = python3
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv =
    PYTHON_LDAP_TRACE_LEVEL=9
    PYTHON_LDAP_TRACE_FILE={envtmpdir}/trace.log
commands = {[testenv]commands}

[testenv:c90]
setenv =
    CFLAGS=-Wno-int-in-bool-context -Werror -Werror=declaration-after-statement -std=c90
commands = {envpython} -Werror -c "import ldap" # we just test compilation here

[testenv:macos]
# Travis CI macOS image does not have slapd
# SDK libldap does not support ldap_init_fd
basepython = python3
deps = {[testenv]deps}
passenv = {[testenv]passenv}
setenv =
    CI_DISABLED=INIT_FD
commands =
    {envpython} -m unittest -v {posargs} \
        Tests/t_cidict.py \
        Tests/t_ldap_dn.py \
        Tests/t_ldap_filter.py \
        Tests/t_ldap_functions.py \
        Tests/t_ldap_modlist.py \
        Tests/t_ldap_schema_tokenizer.py \
        Tests/t_ldapurl.py \
        Tests/t_ldif.py \
        Tests/t_untested_mods.py

[testenv:pypy3]
basepython = pypy3
deps = pytest
commands = {envpython} -m pytest {posargs}

[testenv:doc]
basepython = python3
deps =
    docutils
    markdown
    sphinx
    sphinxcontrib-spelling
commands =
    {envpython} setup.py check --restructuredtext --metadata --strict
    {envpython} -m markdown README -f {envtmpdir}/README.html
    {envpython} -m sphinx -v -W -b html -d {envtmpdir}/doctrees \
        {toxinidir}/Doc {envtmpdir}/html
    {envpython} -m sphinx -v -W -b spelling -d {envtmpdir}/doctrees \
        {toxinidir}/Doc {envtmpdir}/spelling