diff options
author | Joseph Ciurej <ciurej1@llnl.gov> | 2016-07-22 11:12:02 -0700 |
---|---|---|
committer | Joseph Ciurej <ciurej1@llnl.gov> | 2016-07-22 11:12:02 -0700 |
commit | ac2e0962ce64a5b0824e79ad4266cbdb6207b336 (patch) | |
tree | 886f6ea327f3e429f9c67b075a6314c1d2fd3d52 /var | |
parent | fb2d2303d667253c7dfa166607dced4b4b43e26e (diff) | |
download | spack-ac2e0962ce64a5b0824e79ad4266cbdb6207b336.tar.gz spack-ac2e0962ce64a5b0824e79ad4266cbdb6207b336.tar.bz2 spack-ac2e0962ce64a5b0824e79ad4266cbdb6207b336.tar.xz spack-ac2e0962ce64a5b0824e79ad4266cbdb6207b336.zip |
Improved the build flag construction code in the python install method.
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/python/package.py | 34 |
1 files changed, 7 insertions, 27 deletions
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py index 7903f430fc..f755527607 100644 --- a/var/spack/repos/builtin/packages/python/package.py +++ b/var/spack/repos/builtin/packages/python/package.py @@ -101,32 +101,13 @@ class Python(Package): # Rest of install is pretty standard except setup.py needs to # be able to read the CPPFLAGS and LDFLAGS as it scans for the # library and headers to build - include_dirs = [ - spec['openssl'].prefix.include, spec['bzip2'].prefix.include, - spec['readline'].prefix.include, spec['ncurses'].prefix.include, - spec['sqlite'].prefix.include, spec['zlib'].prefix.include - ] - - library_dirs = [ - spec['openssl'].prefix.lib, spec['bzip2'].prefix.lib, - spec['readline'].prefix.lib, spec['ncurses'].prefix.lib, - spec['sqlite'].prefix.lib, spec['zlib'].prefix.lib - ] - - if '+tk' in spec: - include_dirs.extend([ - spec['tk'].prefix.include, spec['tcl'].prefix.include - ]) - library_dirs.extend([ - spec['tk'].prefix.lib, spec['tcl'].prefix.lib - ]) - + dep_pfxs = [dspec.prefix for dspec in spec.dependencies('link')] config_args = [ - "--prefix={0}".format(prefix), - "--with-threads", - "--enable-shared", - "CPPFLAGS=-I{0}".format(" -I".join(include_dirs)), - "LDFLAGS=-L{0}".format(" -L".join(library_dirs)) + '--prefix={0}'.format(prefix), + '--with-threads', + '--enable-shared', + 'CPPFLAGS=-I{0}'.format(' -I'.join(dp.include for dp in dep_pfxs)), + 'LDFLAGS=-L{0}'.format(' -L'.join(dp.lib for dp in dep_pfxs)), ] if '+ucs4' in spec: @@ -142,9 +123,8 @@ class Python(Package): config_args.append('--without-ensurepip') configure(*config_args) - make() - make("install") + make('install') self.filter_compilers(spec, prefix) |