Feature Proposal : Make All Python Extensions User Configuration Independent (#1435)

* Updated all Python extension packages to use 'setup_py' on install.

* Fixed a few minor style issues with the updated Python packages.
This commit is contained in:
Joseph Ciurej 2016-10-06 14:43:49 -07:00 committed by Todd Gamblin
parent 415ddeecf8
commit 82fcc5e1de
87 changed files with 90 additions and 99 deletions

View file

@ -1,5 +0,0 @@
#!/bin/bash --noprofile
PYEXT_REGEX=".*/.*/package.py"
find var/spack/repos/builtin/packages/ -type f -regextype sed -regex ${PYEXT_REGEX} -exec \
sed -i 's/python('\''setup.py'\'', /setup_py(/' {} \;

View file

@ -143,7 +143,7 @@ def cmake_is_on(self, option):
def install(self, spec, prefix):
for package in ['ufl', 'ffc', 'fiat', 'instant']:
with working_dir(join_path('depends', package)):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)
cmake_args = [
'-DCMAKE_BUILD_TYPE:STRING={0}'.format(

View file

@ -37,4 +37,4 @@ class Py3to2(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PySqlalchemy(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyArgcomplete(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -42,4 +42,4 @@ class PyAstroid(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -56,6 +56,5 @@ class PyAstropy(Package):
depends_on('expat')
def install(self, spec, prefix):
python('setup.py', 'build', '--use-system-cfitsio',
'--use-system-expat')
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('build', '--use-system-cfitsio', '--use-system-expat')
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -43,4 +43,4 @@ class PyBasemap(Package):
def install(self, spec, prefix):
env['GEOS_DIR'] = spec['geos'].prefix
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyBeautifulsoup4(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -41,4 +41,4 @@ class PyBiopython(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyBlessings(Package):
extends("python")
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyBottleneck(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -49,4 +49,4 @@ def install(self, spec, prefix):
# building the shared library.
os.environ['LDSHARED'] = "{0} -shared -pthread".format(spack_cc)
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyCoverage(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -44,4 +44,4 @@ class PyCsvkit(Package):
depends_on('py-openpyxl', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyCython(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyDask(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyDateutil(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyDbf(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyDecorator(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyEmcee(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -36,4 +36,4 @@ class PyEpydoc(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyFuncsigs(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyGenshi(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyGnuplot(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -56,11 +56,10 @@ class PyH5py(Package):
depends_on('py-six', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'configure',
'--hdf5={0}'.format(spec['hdf5'].prefix))
setup_py('configure', '--hdf5={0}'.format(spec['hdf5'].prefix))
if '+mpi' in spec:
env['CC'] = spec['mpi'].mpicc
python('setup.py', 'configure', '--mpi')
setup_py('configure', '--mpi')
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -43,4 +43,4 @@ class PyIminuit(Package):
depends_on('py-cython', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -39,4 +39,4 @@ class PyIpython(Package):
depends_on('py-setuptools', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyJdcal(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -45,4 +45,4 @@ class PyLockfile(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyLogilabCommon(Package):
depends_on("py-six", type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyMako(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -43,4 +43,4 @@ class PyMistune(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyMock(Package):
depends_on('py-setuptools@17.1:', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -43,4 +43,4 @@ class PyMpi4py(Package):
depends_on('mpi')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyMpmath(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyMx(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyMysqldb1(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -41,4 +41,4 @@ class PyNestle(Package):
depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -38,4 +38,4 @@ class PyNetcdf(Package):
depends_on('netcdf')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyNetworkx(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyNose(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyNumexpr(Package):
depends_on('py-numpy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyOpenpyxl(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -51,4 +51,4 @@ class PyPandas(Package):
depends_on('py-bottleneck', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyPbr(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyPeriodictable(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyPexpect(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyPhonopy(Package):
depends_on('py-pyyaml', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--home=%s' % prefix)
setup_py('install', '--home=%s' % prefix)

View file

@ -43,4 +43,4 @@ class PyPil(Package):
depends_on('python@1.5.2:2.8')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -129,5 +129,5 @@ def variant_to_flag(variant):
variants = ['jpeg', 'zlib', 'tiff', 'freetype', 'lcms', 'jpeg2000']
build_args = list(map(variant_to_flag, variants))
python('setup.py', 'build_ext', *build_args)
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('build_ext', *build_args)
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -35,4 +35,4 @@ class PyPly(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyPmw(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyPrettytable(Package):
depends_on("py-setuptools", type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -47,4 +47,4 @@ class PyProtobuf(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -43,4 +43,4 @@ class PyPy2neo(Package):
extends("python")
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyPychecker(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyPycparser(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyPydatalog(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -36,4 +36,4 @@ class PyPyelftools(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyPylint(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyPypar(Package):
def install(self, spec, prefix):
with working_dir('source'):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyPyparsing(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -42,4 +42,4 @@ class PyPytables(Package):
def install(self, spec, prefix):
env["HDF5_DIR"] = spec['hdf5'].prefix
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -47,4 +47,4 @@ class PyPythonDaemon(Package):
depends_on("py-lockfile", type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class PyPyyaml(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyRestview(Package):
depends_on('py-pygments', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -44,4 +44,4 @@ class PyRpy2(Package):
depends_on('R')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyScientificpython(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -45,4 +45,4 @@ class PyScikitImage(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -41,4 +41,4 @@ class PyScikitLearn(Package):
depends_on('py-scipy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -64,6 +64,4 @@ def patch(self):
'shiboken_postinstall.py')
def install(self, spec, prefix):
python('setup.py', 'install',
'--prefix=%s' % prefix,
'--jobs=%s' % make_jobs)
setup_py('install', '--prefix=%s' % prefix, '--jobs=%s' % make_jobs)

View file

@ -48,4 +48,4 @@ class PySncosmo(Package):
depends_on('py-nestle', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -37,4 +37,4 @@ class PyStorm(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PySympy(Package):
depends_on('py-mpmath', when='@1.0:')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyTappy(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -41,4 +41,4 @@ class PyTuiview(Package):
depends_on("gdal")
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyTwisted(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyUnittest2(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -39,4 +39,4 @@ class PyUnittest2py3k(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyUrwid(Package):
extends("python")
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -38,4 +38,4 @@ class PyVirtualenv(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -40,4 +40,4 @@ class PyWcsaxes(Package):
depends_on('py-astropy', type=nolink)
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix={0}'.format(prefix))
setup_py('install', '--prefix={0}'.format(prefix))

View file

@ -37,4 +37,4 @@ class PyWheel(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyXlrd(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -37,4 +37,4 @@ class PyYapf(Package):
depends_on('py-setuptools', type='build')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)

View file

@ -35,4 +35,4 @@ class Scons(Package):
extends('python')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
setup_py('install', '--prefix=%s' % prefix)