Skip to content

Commit

Permalink
python: add debug variant to enable pydebug (spack#14584)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgamblin authored Jan 21, 2020
1 parent 796722a commit 4d794d6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions var/spack/repos/builtin/packages/python/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 4d794d6

Please sign in to comment.