summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2015-02-09 02:54:49 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2015-02-09 02:54:49 -0800
commit25af341954fa7c9a88943fe24cad88275ee00795 (patch)
tree27ce8ba8142c68858793b5466d9aeb5c2afffea1
parentaae364b4c9ffdf8949a8c7ce5a7e63c9772703c0 (diff)
downloadspack-25af341954fa7c9a88943fe24cad88275ee00795.tar.gz
spack-25af341954fa7c9a88943fe24cad88275ee00795.tar.bz2
spack-25af341954fa7c9a88943fe24cad88275ee00795.tar.xz
spack-25af341954fa7c9a88943fe24cad88275ee00795.zip
Python package improvements.
-rw-r--r--var/spack/packages/geos/package.py31
-rw-r--r--var/spack/packages/py-basemap/package.py9
-rw-r--r--var/spack/packages/py-biopython/package.py1
-rw-r--r--var/spack/packages/py-gnuplot/package.py1
-rw-r--r--var/spack/packages/py-libxml2/package.py1
-rw-r--r--var/spack/packages/py-matplotlib/package.py3
-rw-r--r--var/spack/packages/py-pyside/package.py31
-rw-r--r--var/spack/packages/py-shiboken/package.py21
-rw-r--r--var/spack/packages/python/package.py5
9 files changed, 90 insertions, 13 deletions
diff --git a/var/spack/packages/geos/package.py b/var/spack/packages/geos/package.py
new file mode 100644
index 0000000000..4a2657e32f
--- /dev/null
+++ b/var/spack/packages/geos/package.py
@@ -0,0 +1,31 @@
+from spack import *
+
+class Geos(Package):
+ """GEOS (Geometry Engine - Open Source) is a C++ port of the Java
+ Topology Suite (JTS). As such, it aims to contain the complete
+ functionality of JTS in C++. This includes all the OpenGIS
+ Simple Features for SQL spatial predicate functions and spatial
+ operators, as well as specific JTS enhanced topology functions."""
+
+ homepage = "http://trac.osgeo.org/geos/"
+ url = "http://download.osgeo.org/geos/geos-3.4.2.tar.bz2"
+
+ version('3.4.2', 'fc5df2d926eb7e67f988a43a92683bae')
+ version('3.4.1', '4c930dec44c45c49cd71f3e0931ded7e')
+ version('3.4.0', 'e41318fc76b5dc764a69d43ac6b18488')
+ version('3.3.9', '4794c20f07721d5011c93efc6ccb8e4e')
+ version('3.3.8', '75be476d0831a2d14958fed76ca266de')
+ version('3.3.7', '95ab996d22672b067d92c7dee2170460')
+ version('3.3.6', '6fadfb941541875f4976f75fb0bbc800')
+ version('3.3.5', '2ba61afb7fe2c5ddf642d82d7b16e75b')
+ version('3.3.4', '1bb9f14d57ef06ffa41cb1d67acb55a1')
+ version('3.3.3', '8454e653d7ecca475153cc88fd1daa26')
+
+ extends('python')
+ depends_on('swig')
+
+ def install(self, spec, prefix):
+ configure("--prefix=%s" % prefix,
+ "--enable-python")
+ make()
+ make("install")
diff --git a/var/spack/packages/py-basemap/package.py b/var/spack/packages/py-basemap/package.py
index 7b6d8e7e65..45f1085ba1 100644
--- a/var/spack/packages/py-basemap/package.py
+++ b/var/spack/packages/py-basemap/package.py
@@ -8,18 +8,13 @@ class PyBasemap(Package):
version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8')
- geos_version = {'1.0.7' : '3.3.3'}
-
extends('python')
depends_on('py-setuptools')
depends_on('py-numpy')
depends_on('py-matplotlib')
depends_on('py-pil')
+ depends_on("geos")
def install(self, spec, prefix):
- with working_dir('geos-%s' % self.geos_version[str(self.version)]):
- configure("--prefix=" + prefix)
- make()
- make("install")
- os.environ['GEOS_DIR'] = prefix
+ env['GEOS_DIR'] = spec['geos'].prefix
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/packages/py-biopython/package.py b/var/spack/packages/py-biopython/package.py
index 2ed04c389e..8ecaf48626 100644
--- a/var/spack/packages/py-biopython/package.py
+++ b/var/spack/packages/py-biopython/package.py
@@ -9,6 +9,7 @@ class PyBiopython(Package):
extends('python')
depends_on('py-mx')
+ depends_on('py-numpy')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/packages/py-gnuplot/package.py b/var/spack/packages/py-gnuplot/package.py
index 0a2c073a49..ede4472c03 100644
--- a/var/spack/packages/py-gnuplot/package.py
+++ b/var/spack/packages/py-gnuplot/package.py
@@ -8,6 +8,7 @@ class PyGnuplot(Package):
version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1')
extends('python')
+ depends_on('py-numpy')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/packages/py-libxml2/package.py b/var/spack/packages/py-libxml2/package.py
index 0dcefbd9cf..e645acb5dd 100644
--- a/var/spack/packages/py-libxml2/package.py
+++ b/var/spack/packages/py-libxml2/package.py
@@ -8,6 +8,7 @@ class PyLibxml2(Package):
version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3')
extends('python')
+ depends_on('libxml2')
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
diff --git a/var/spack/packages/py-matplotlib/package.py b/var/spack/packages/py-matplotlib/package.py
index 5979ceeab0..8b8684c563 100644
--- a/var/spack/packages/py-matplotlib/package.py
+++ b/var/spack/packages/py-matplotlib/package.py
@@ -17,9 +17,12 @@ class PyMatplotlib(Package):
depends_on('py-pytz')
depends_on('py-nose')
depends_on('py-numpy')
+ depends_on('qt')
+
def install(self, spec, prefix):
python('setup.py', 'install', '--prefix=%s' % prefix)
+
if str(self.version) == '1.4.2':
# hack to fix configuration file
config_file = None
diff --git a/var/spack/packages/py-pyside/package.py b/var/spack/packages/py-pyside/package.py
index b01e16d7e6..7528a0bf72 100644
--- a/var/spack/packages/py-pyside/package.py
+++ b/var/spack/packages/py-pyside/package.py
@@ -10,9 +10,32 @@ class PyPyside(Package):
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d')
extends('python')
+ 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.
+ # 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')
+
+ # PySide tries to patch ELF files to remove RPATHs
+ # Disable this and go with the one we set.
+ filter_file(
+ r'rpath_cmd\(pyside_path, srcpath\)',
+ r'#rpath_cmd(pyside_path, srcpath)',
+ 'pyside_postinstall.py')
+
def install(self, spec, prefix):
- qmake_path = '/usr/lib64/qt4/bin/qmake'
- if not os.path.exists(qmake_path):
- raise spack.package.InstallError("Failed to find qmake in %s" % qmake_path)
- python('setup.py', 'install', '--prefix=%s' % prefix, '--qmake=%s' % qmake_path)
+ python('setup.py', 'install',
+ '--prefix=%s' % prefix,
+ '--jobs=%s' % make_jobs)
+
+
diff --git a/var/spack/packages/py-shiboken/package.py b/var/spack/packages/py-shiboken/package.py
new file mode 100644
index 0000000000..47abe64e65
--- /dev/null
+++ b/var/spack/packages/py-shiboken/package.py
@@ -0,0 +1,21 @@
+from spack import *
+
+class PyShiboken(Package):
+ """Shiboken generates bindings for C++ libraries using CPython source code."""
+ homepage = "https://shiboken.readthedocs.org/"
+ url = "https://pypi.python.org/packages/source/S/Shiboken/Shiboken-1.2.2.tar.gz"
+
+ version('1.2.2', '345cfebda221f525842e079a6141e555')
+
+ # TODO: make build dependency
+ # depends_on("cmake")
+
+ extends('python')
+ depends_on("py-setuptools")
+ depends_on("libxml2")
+ depends_on("qt@:4.8")
+
+ def install(self, spec, prefix):
+ python('setup.py', 'install',
+ '--prefix=%s' % prefix,
+ '--jobs=%s' % make_jobs)
diff --git a/var/spack/packages/python/package.py b/var/spack/packages/python/package.py
index eed81d095c..4b3b31eb6b 100644
--- a/var/spack/packages/python/package.py
+++ b/var/spack/packages/python/package.py
@@ -1,9 +1,10 @@
-from spack import *
-import spack
import os
import re
from contextlib import closing
+from spack import *
+import spack
+
class Python(Package):
"""The Python programming language."""