summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-12-21 09:24:16 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-12-21 09:24:16 -0800
commitd5e9279c1d40831f806ec6de87d0c447c55d4015 (patch)
tree8f7ce34b4707f26421da891d2bcdcdef2bc28001
parentdccfcd10f7eaea8bfa7db75d1b49c6119854e0ec (diff)
parentaa137d8be0101776f0841e3d75642245454d2b32 (diff)
downloadspack-d5e9279c1d40831f806ec6de87d0c447c55d4015.tar.gz
spack-d5e9279c1d40831f806ec6de87d0c447c55d4015.tar.bz2
spack-d5e9279c1d40831f806ec6de87d0c447c55d4015.tar.xz
spack-d5e9279c1d40831f806ec6de87d0c447c55d4015.zip
Merge pull request #215 from sjtbham/develop
fix build to work against depends for modules created by setup.py and…
-rw-r--r--var/spack/packages/python/package.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py
index 31fb8b3d5a..12b282910b 100644
--- a/var/spack/packages/python/package.py
+++ b/var/spack/packages/python/package.py
@@ -2,6 +2,7 @@ import os
import re
from contextlib import closing
from llnl.util.lang import match_predicate
+from spack.util.environment import *
from spack import *
import spack
@@ -16,22 +17,33 @@ class Python(Package):
version('2.7.8', 'd235bdfa75b8396942e360a70487ee00')
version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6')
+ version('3.5.0', 'd149d2812f10cbe04c042232e7964171')
depends_on("openssl")
depends_on("bzip2")
depends_on("readline")
depends_on("ncurses")
depends_on("sqlite")
+ depends_on("zlib")
def install(self, spec, prefix):
# Need this to allow python build to find the Python installation.
env['PYTHONHOME'] = prefix
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
- # Rest of install is pretty standard.
+ # 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
configure("--prefix=%s" % prefix,
"--with-threads",
- "--enable-shared")
+ "--enable-shared",
+ "CPPFLAGS=-I%s/include -I%s/include -I%s/include -I%s/include -I%s/include -I%s/include" % (
+ spec['openssl'].prefix, spec['bzip2'].prefix,
+ spec['readline'].prefix, spec['ncurses'].prefix,
+ spec['sqlite'].prefix, spec['zlib'].prefix),
+ "LDFLAGS=-L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib -L%s/lib" % (
+ spec['openssl'].prefix, spec['bzip2'].prefix,
+ spec['readline'].prefix, spec['ncurses'].prefix,
+ spec['sqlite'].prefix, spec['zlib'].prefix))
make()
make("install")
@@ -63,7 +75,10 @@ class Python(Package):
python('setup.py', 'install', '--prefix=%s' % prefix)
"""
# Python extension builds can have a global python executable function
- module.python = Executable(join_path(spec.prefix.bin, 'python'))
+ if self.version >= Version("3.0.0") and self.version < Version("4.0.0"):
+ module.python = Executable(join_path(spec.prefix.bin, 'python3'))
+ else:
+ module.python = Executable(join_path(spec.prefix.bin, 'python'))
# Add variables for lib/pythonX.Y and lib/pythonX.Y/site-packages dirs.
module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)