PythonPackage builds flat installs instead of egg directories.
- Spack doesn't need eggs -- it manages its own directories
- Simplify install layout and reduce sys.path searches by installing all
packages flat (eggs are deprecated for wheels, and this is also what
wheels do).
- We now supply the --single-version-externally-managed argument to
`setup.py install` for setuptools packages and setuptools.
- modify packages to only use setuptools args if setuptools is an
immediate dependency
- Remove setuptools from packages that do not need it.
- Some packages use setuptools *only* when certain args (likeb
'develop' or 'bdist') are supplied to setup.py, and they specifically
do not use setuptools for installation.
- Spack never calls setup.py this way, so just removing the setuptools
dependency works for these packages.
This commit is contained in:
@@ -222,7 +222,24 @@ def install(self, spec, prefix):
|
||||
|
||||
def install_args(self, spec, prefix):
|
||||
"""Arguments to pass to install."""
|
||||
return ['--prefix={0}'.format(prefix)]
|
||||
args = ['--prefix={0}'.format(prefix)]
|
||||
|
||||
# This option causes python packages (including setuptools) NOT
|
||||
# to create eggs or easy-install.pth files. Instead, they
|
||||
# install naturally into $prefix/pythonX.Y/site-packages.
|
||||
#
|
||||
# Eggs add an extra level of indirection to sys.path, slowing
|
||||
# down large HPC runs. They are also deprecated in favor of
|
||||
# wheels, which use a normal layout when installed.
|
||||
#
|
||||
# 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.
|
||||
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=/']
|
||||
|
||||
return args
|
||||
|
||||
def install_lib(self, spec, prefix):
|
||||
"""Install all Python modules (extensions and pure Python)."""
|
||||
|
||||
Reference in New Issue
Block a user