python: add debug variant to enable pydebug (#14584)

This commit is contained in:
Todd Gamblin 2020-01-21 15:09:41 -08:00 committed by GitHub
parent 796722aeee
commit 4d794d63b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,11 @@ class Python(AutotoolsPackage):
extendable = True
variant(
'debug', default=False,
description="debug build with extra checks (this is high overhead)"
)
# --enable-shared is known to cause problems for some users on macOS
# See http://bugs.python.org/issue29846
variant('shared', default=sys.platform != 'darwin',
@ -242,6 +247,11 @@ def configure_args(self):
spec.satisfies('@2.7.12:2.8,3.5.2:', strict=True):
config_args.append('--with-icc')
if '+debug' in spec:
config_args.append('--with-pydebug')
else:
config_args.append('--without-pydebug')
if '+shared' in spec:
config_args.append('--enable-shared')
else: