diff options
author | bst-marge-bot <marge-bot@buildstream.build> | 2019-05-31 14:15:43 +0000 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2019-05-31 14:15:43 +0000 |
commit | 3f91a4230cd54382a8819e7aeb407752d0eee33c (patch) | |
tree | 40327052a8dd42fe80a09a74550862c62671e232 | |
parent | fd91071fd2666f54f6beb967d6762415525e3e56 (diff) | |
parent | 54b93af2c5505f6c36f2c025c498b312c9bdf81a (diff) | |
download | buildstream-3f91a4230cd54382a8819e7aeb407752d0eee33c.tar.gz |
Merge branch 'bschubert/cython-disable-linetrace' into 'master'
Setup.py: Disable linetrace by default and only enable when using coverage
See merge request BuildStream/buildstream!1367
-rwxr-xr-x | setup.py | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -324,8 +324,10 @@ def assert_cython_required(): raise SystemExit(1) +ENABLE_CYTHON_TRACE = os.environ.get("BST_CYTHON_TRACE", "0") + extension_macros = [ - ("CYTHON_TRACE", os.environ.get("BST_CYTHON_TRACE", 0)) + ("CYTHON_TRACE", ENABLE_CYTHON_TRACE) ] @@ -458,9 +460,8 @@ setup(name='BuildStream', # Version of python to use # https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#arguments "language_level": "3", - # Enable line tracing, this is needed in order to generate coverage. - # This is not enabled unless the CYTHON_TRACE macro for distutils is defined. - "linetrace": True, + # Enable line tracing when requested only, this is needed in order to generate coverage. + "linetrace": bool(ENABLE_CYTHON_TRACE), "profile": os.environ.get("BST_CYTHON_PROFILE", False), } ), |