Skip to content

Commit f37b054

Browse files
committed
Remove unnecessary template and fix codecov options, I hope.
1 parent 06c7a11 commit f37b054

File tree

3 files changed

+13
-175
lines changed

3 files changed

+13
-175
lines changed

ci/templates/tox.ini

Lines changed: 0 additions & 122 deletions
This file was deleted.

setup.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ def read(*names, **kwargs):
2727
return fh.read()
2828

2929

30-
# Enable code coverage for C code: we can't use CFLAGS=-coverage in tox.ini, since that may mess with compiling
31-
# dependencies (e.g. numpy). Therefore we set SETUPPY_CFLAGS=-coverage in tox.ini and copy it to CFLAGS here (after
32-
# deps have been safely installed).
33-
if 'TOXENV' in os.environ and 'SETUPPY_CFLAGS' in os.environ:
34-
os.environ['CFLAGS'] = os.environ['SETUPPY_CFLAGS']
35-
36-
3730
class optional_build_ext(build_ext):
3831
"""Allow the building of C extensions to fail."""
3932
def run(self):
@@ -124,7 +117,9 @@ def _unavailable(self, e):
124117
Extension(
125118
splitext(relpath(path, 'src').replace(os.sep, '.'))[0],
126119
sources=[path],
127-
include_dirs=[dirname(path)]
120+
extra_compile_args=os.environ.get('SETUPPY_CFLAGS', '').split(),
121+
extra_link_args=os.environ.get('SETUPPY_LFLAGS', '').split(),
122+
include_dirs=[dirname(path)],
128123
)
129124
for root, _, _ in os.walk('src')
130125
for path in glob(join(root, '*.c'))

tox.ini

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ envlist =
1010
ignore_basepython_conflict = true
1111

1212
[testenv]
13-
wheel = true
1413
basepython =
1514
pypy: {env:TOXPYTHON:pypy}
1615
pypy3: {env:TOXPYTHON:pypy3}
@@ -24,9 +23,16 @@ basepython =
2423
setenv =
2524
PYTHONPATH={toxinidir}/tests
2625
PYTHONUNBUFFERED=yes
26+
cover: SETUPPY_CFLAGS=-fprofile-arcs -ftest-coverage
27+
cover: SETUPPY_LFLAGS=-lgcov
2728
passenv =
2829
*
29-
usedevelop = false
30+
usedevelop =
31+
cover: true
32+
nocov: false
33+
wheel =
34+
cover: false
35+
nocov: true
3036
deps =
3137
pytest
3238
pytest-benchmark
@@ -100,7 +106,8 @@ deps =
100106
codecov
101107
skip_install = true
102108
commands =
103-
codecov []
109+
codecov --gcov-root=. []
110+
104111

105112
[testenv:report]
106113
deps = coverage
@@ -113,45 +120,3 @@ commands =
113120
commands = coverage erase
114121
skip_install = true
115122
deps = coverage
116-
117-
118-
[testenv:py27-cover]
119-
setenv =
120-
SETUPPY_CFLAGS=-coverage
121-
usedevelop = true
122-
123-
124-
[testenv:py35-cover]
125-
setenv =
126-
SETUPPY_CFLAGS=-coverage
127-
usedevelop = true
128-
129-
130-
[testenv:py36-cover]
131-
setenv =
132-
SETUPPY_CFLAGS=-coverage
133-
usedevelop = true
134-
135-
136-
[testenv:py37-cover]
137-
setenv =
138-
SETUPPY_CFLAGS=-coverage
139-
usedevelop = true
140-
141-
142-
[testenv:py38-cover]
143-
setenv =
144-
SETUPPY_CFLAGS=-coverage
145-
usedevelop = true
146-
147-
148-
[testenv:pypy-cover]
149-
setenv =
150-
SETUPPY_CFLAGS=-coverage
151-
usedevelop = true
152-
153-
154-
[testenv:pypy3-cover]
155-
setenv =
156-
SETUPPY_CFLAGS=-coverage
157-
usedevelop = true

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy