summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGregory Lee <lee218@llnl.gov>2018-03-21 14:34:27 -0700
committerAdam J. Stewart <ajstewart426@gmail.com>2018-03-21 16:34:27 -0500
commit7504e9997db3ce355ab0380f316ca7427b2a5c9a (patch)
tree86565ac0d8426ca95014dc0a5577c1f57c8dd62e /lib
parent55f4bbb1116cadb7ee5c05d9932d4365b8f919c4 (diff)
downloadspack-7504e9997db3ce355ab0380f316ca7427b2a5c9a.tar.gz
spack-7504e9997db3ce355ab0380f316ca7427b2a5c9a.tar.bz2
spack-7504e9997db3ce355ab0380f316ca7427b2a5c9a.tar.xz
spack-7504e9997db3ce355ab0380f316ca7427b2a5c9a.zip
make py-setuptools a run-time-only dep for py-basemap and patch pytho… (#6989)
* make py-setuptools a run-time-only dep for py-basemap and patch python package to only apply setuptools flag for build deps * py-qtconsole does not require setuptools
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/build_systems/python.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/spack/spack/build_systems/python.py b/lib/spack/spack/build_systems/python.py
index fcfa68e4f4..837ebd65ae 100644
--- a/lib/spack/spack/build_systems/python.py
+++ b/lib/spack/spack/build_systems/python.py
@@ -237,9 +237,15 @@ class PythonPackage(PackageBase):
# Spack manages the package directory on its own by symlinking
# extensions into the site-packages directory, so we don't really
# need the .pth files or egg directories, anyway.
+ #
+ # We need to make sure this is only for build dependencies. A package
+ # such as py-basemap will not build properly with this flag since
+ # it does not use setuptools to build and those does not recognize
+ # the --single-version-externally-managed flag
if ('py-setuptools' == spec.name or # this is setuptools, or
- 'py-setuptools' in spec._dependencies): # it's an immediate dep
- args += ['--single-version-externally-managed', '--root=/']
+ 'py-setuptools' in spec._dependencies and # it's an immediate dep
+ 'build' in spec._dependencies['py-setuptools'].deptypes):
+ args += ['--single-version-externally-managed', '--root=/']
return args