Merge branch 'develop' into mplegendre-multi_pkgsrc_roots
Conflicts: lib/spack/spack/cmd/create.py lib/spack/spack/cmd/extensions.py lib/spack/spack/cmd/fetch.py lib/spack/spack/cmd/uninstall.py lib/spack/spack/config.py lib/spack/spack/database.py lib/spack/spack/directory_layout.py lib/spack/spack/packages.py lib/spack/spack/spec.py
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import re
|
||||
from contextlib import closing
|
||||
from llnl.util.lang import match_predicate
|
||||
from spack.util.environment import *
|
||||
|
||||
from spack import *
|
||||
import spack
|
||||
@@ -16,21 +17,40 @@ class Python(Package):
|
||||
|
||||
version('2.7.8', 'd235bdfa75b8396942e360a70487ee00')
|
||||
version('2.7.10', 'c685ef0b8e9f27b5e3db5db12b268ac6')
|
||||
version('2.7.11', '1dbcc848b4cd8399a8199d000f9f823c', preferred=True)
|
||||
version('3.5.0', 'd149d2812f10cbe04c042232e7964171')
|
||||
version('3.5.1', 'e9ea6f2623fffcdd871b7b19113fde80')
|
||||
|
||||
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.
|
||||
configure("--prefix=%s" % prefix,
|
||||
# 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_args= [
|
||||
"--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)
|
||||
]
|
||||
if spec.satisfies('@3:'):
|
||||
configure_args.append('--without-ensurepip')
|
||||
configure(*configure_args)
|
||||
make()
|
||||
make("install")
|
||||
|
||||
@@ -62,7 +82,10 @@ def setup_dependent_environment(self, module, spec, ext_spec):
|
||||
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)
|
||||
@@ -94,7 +117,7 @@ def python_ignore(self, ext_pkg, args):
|
||||
|
||||
# Ignore pieces of setuptools installed by other packages.
|
||||
if ext_pkg.name != 'py-setuptools':
|
||||
patterns.append(r'/site\.pyc?$')
|
||||
patterns.append(r'/site[^/]*\.pyc?$')
|
||||
patterns.append(r'setuptools\.pth')
|
||||
patterns.append(r'bin/easy_install[^/]*$')
|
||||
patterns.append(r'setuptools.*egg$')
|
||||
|
Reference in New Issue
Block a user