summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-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.py18
-rw-r--r--var/spack/packages/qt/package.py11
10 files changed, 108 insertions, 19 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..1fd037d75f 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 8a6d574d9b..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."""
@@ -46,7 +47,7 @@ class Python(Package):
return os.path.join(self.python_lib_dir, 'site-packages')
- def setup_extension_environment(self, module, spec, ext_spec):
+ def setup_dependent_environment(self, module, spec, ext_spec):
"""Called before python modules' install() methods.
In most cases, extensions will only need to have one line::
@@ -60,12 +61,17 @@ class Python(Package):
module.python_lib_dir = os.path.join(ext_spec.prefix, self.python_lib_dir)
module.site_packages_dir = os.path.join(ext_spec.prefix, self.site_packages_dir)
- # Add site packages directory to the PYTHONPATH
- os.environ['PYTHONPATH'] = module.site_packages_dir
-
# Make the site packages directory if it does not exist already.
mkdirp(module.site_packages_dir)
+ # Set PYTHONPATH to include site-packages dir for the
+ # extension and any other python extensions it depends on.
+ python_paths = []
+ for d in ext_spec.traverse():
+ if d.package.extends(self.spec):
+ python_paths.append(os.path.join(d.prefix, self.site_packages_dir))
+ os.environ['PYTHONPATH'] = ':'.join(python_paths)
+
# ========================================================================
# Handle specifics of activating and deactivating python modules.
diff --git a/var/spack/packages/qt/package.py b/var/spack/packages/qt/package.py
index c8b19d07f5..446f7b67a4 100644
--- a/var/spack/packages/qt/package.py
+++ b/var/spack/packages/qt/package.py
@@ -1,3 +1,4 @@
+import os
from spack import *
import os
@@ -30,7 +31,7 @@ class Qt(Package):
depends_on("libmng")
depends_on("jpeg")
- # Webkit
+ # Webkit
# depends_on("gperf")
# depends_on("flex")
# depends_on("bison")
@@ -41,6 +42,12 @@ class Qt(Package):
depends_on("mesa")
depends_on("libxcb")
+
+ def setup_dependent_environment(self, module, spec, dep_spec):
+ """Dependencies of Qt find it using the QTDIR environment variable."""
+ os.environ['QTDIR'] = self.prefix
+
+
def patch(self):
if self.spec.satisfies('@4'):
qmake_conf = 'mkspecs/common/g++-base.conf'
@@ -56,7 +63,7 @@ class Qt(Package):
def install(self, spec, prefix):
- # Apparently this is the only way to
+ # Apparently this is the only way to
# "truly" get rid of webkit compiles now...
os.rename("qtwebkit","no-qtwebkit")
os.rename("qtwebkit-examples","no-qtwebkit-examples")