Skip to content

Commit f224eae

Browse files
committed
command line option to enable cython coverage; closes pandas-dev#21991
1 parent 8afd7cb commit f224eae

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

setup.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -438,9 +438,12 @@ def get_tag(self):
438438

439439

440440
# enable coverage by building cython files by setting the environment variable
441-
# "PANDAS_CYTHON_COVERAGE" (with a Truthy value)
441+
# "PANDAS_CYTHON_COVERAGE" (with a Truthy value) or by running build_ext
442+
# with `--with-cython-coverage`enabled
442443
linetrace = os.environ.get('PANDAS_CYTHON_COVERAGE', False)
443-
CYTHON_TRACE = str(int(bool(linetrace)))
444+
if '--with-cython-coverage' in sys.argv:
445+
linetrace = True
446+
sys.argv.remove('--with-cython-coverage')
444447

445448
# Note: if not using `cythonize`, coverage can be enabled by
446449
# pinning `ext.cython_directives = directives` to each ext in extensions.

0 commit comments

Comments
 (0)