Python package cleanup.

- Added a number of dependencies to python packages.
- Python packages may still not build without some OS support.
- Example: Numpy needs ATLAS, and will use a system ATLAS install.
  - Atlas requires turning off CPU throttling to build.
  - can't do this as a regular user -- how to build ATLAS with Spack
  - currnetly relying on a system ATLAS install.
This commit is contained in:
Todd Gamblin 2015-02-15 23:04:20 -08:00
parent 847ed8ad39
commit 8aa3afcfde
6 changed files with 32 additions and 3 deletions

View File

@ -9,6 +9,7 @@ class PyLibxml2(Package):
extends('python')
depends_on('libxml2')
depends_on('libxslt')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@ -17,8 +17,12 @@ class PyMatplotlib(Package):
depends_on('py-pytz')
depends_on('py-nose')
depends_on('py-numpy')
depends_on('qt')
depends_on('qt')
depends_on('bzip2')
depends_on('tcl')
depends_on('tk')
depends_on('qhull')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@ -13,7 +13,6 @@ class PyPyside(Package):
depends_on('py-setuptools')
depends_on('qt@:4')
def patch(self):
"""Undo PySide RPATH handling and add Spack RPATH."""
# Add Spack's standard CMake args to the sub-builds.

View File

@ -10,5 +10,7 @@ class PyRpy2(Package):
extends('python')
depends_on('py-setuptools')
depends_on('R')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)

View File

@ -1,7 +1,11 @@
from spack import *
class PyScientificpython(Package):
"""ScientificPython is a collection of Python modules for scientific computing. It contains support for geometry, mathematical functions, statistics, physical units, IO, visualization, and parallelization."""
"""ScientificPython is a collection of Python modules for
scientific computing. It contains support for geometry,
mathematical functions, statistics, physical units, IO,
visualization, and parallelization."""
homepage = "https://sourcesup.renater.fr/projects/scientific-py/"
url = "https://sourcesup.renater.fr/frs/download.php/4411/ScientificPython-2.8.1.tar.gz"

View File

@ -15,6 +15,25 @@ class PyShiboken(Package):
depends_on("libxml2")
depends_on("qt@:4.8")
def patch(self):
"""Undo Shiboken RPATH handling and add Spack RPATH."""
# Add Spack's standard CMake args to the sub-builds.
# They're called BY setup.py so we have to patch it.
filter_file(
r'OPTION_CMAKE,',
r'OPTION_CMAKE, ' + (
'"-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=FALSE", '
'"-DCMAKE_INSTALL_RPATH=%s",' % ':'.join(self.rpath)),
'setup.py')
# Shiboken tries to patch ELF files to remove RPATHs
# Disable this and go with the one we set.
filter_file(
r'^\s*rpath_cmd\(shiboken_path, srcpath\)',
r'#rpath_cmd(shiboken_path, srcpath)',
'shiboken_postinstall.py')
def install(self, spec, prefix):
python('setup.py', 'install',
'--prefix=%s' % prefix,