Python package improvements.
This commit is contained in:
parent
aae364b4c9
commit
25af341954
31
var/spack/packages/geos/package.py
Normal file
31
var/spack/packages/geos/package.py
Normal file
@ -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")
|
@ -8,18 +8,13 @@ class PyBasemap(Package):
|
|||||||
|
|
||||||
version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8')
|
version('1.0.7', '48c0557ced9e2c6e440b28b3caff2de8')
|
||||||
|
|
||||||
geos_version = {'1.0.7' : '3.3.3'}
|
|
||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
depends_on('py-setuptools')
|
depends_on('py-setuptools')
|
||||||
depends_on('py-numpy')
|
depends_on('py-numpy')
|
||||||
depends_on('py-matplotlib')
|
depends_on('py-matplotlib')
|
||||||
depends_on('py-pil')
|
depends_on('py-pil')
|
||||||
|
depends_on("geos")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
with working_dir('geos-%s' % self.geos_version[str(self.version)]):
|
env['GEOS_DIR'] = spec['geos'].prefix
|
||||||
configure("--prefix=" + prefix)
|
|
||||||
make()
|
|
||||||
make("install")
|
|
||||||
os.environ['GEOS_DIR'] = prefix
|
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
@ -9,6 +9,7 @@ class PyBiopython(Package):
|
|||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
depends_on('py-mx')
|
depends_on('py-mx')
|
||||||
|
depends_on('py-numpy')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
@ -8,6 +8,7 @@ class PyGnuplot(Package):
|
|||||||
version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1')
|
version('1.8', 'abd6f571e7aec68ae7db90a5217cd5b1')
|
||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
|
depends_on('py-numpy')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
@ -8,6 +8,7 @@ class PyLibxml2(Package):
|
|||||||
version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3')
|
version('2.6.21', '229dd2b3d110a77defeeaa73af83f7f3')
|
||||||
|
|
||||||
extends('python')
|
extends('python')
|
||||||
|
depends_on('libxml2')
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
@ -17,9 +17,12 @@ class PyMatplotlib(Package):
|
|||||||
depends_on('py-pytz')
|
depends_on('py-pytz')
|
||||||
depends_on('py-nose')
|
depends_on('py-nose')
|
||||||
depends_on('py-numpy')
|
depends_on('py-numpy')
|
||||||
|
depends_on('qt')
|
||||||
|
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
def install(self, spec, prefix):
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix)
|
python('setup.py', 'install', '--prefix=%s' % prefix)
|
||||||
|
|
||||||
if str(self.version) == '1.4.2':
|
if str(self.version) == '1.4.2':
|
||||||
# hack to fix configuration file
|
# hack to fix configuration file
|
||||||
config_file = None
|
config_file = None
|
||||||
|
@ -10,9 +10,32 @@ class PyPyside(Package):
|
|||||||
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d')
|
version('1.2.2', 'c45bc400c8a86d6b35f34c29e379e44d')
|
||||||
|
|
||||||
extends('python')
|
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):
|
def install(self, spec, prefix):
|
||||||
qmake_path = '/usr/lib64/qt4/bin/qmake'
|
python('setup.py', 'install',
|
||||||
if not os.path.exists(qmake_path):
|
'--prefix=%s' % prefix,
|
||||||
raise spack.package.InstallError("Failed to find qmake in %s" % qmake_path)
|
'--jobs=%s' % make_jobs)
|
||||||
python('setup.py', 'install', '--prefix=%s' % prefix, '--qmake=%s' % qmake_path)
|
|
||||||
|
|
||||||
|
21
var/spack/packages/py-shiboken/package.py
Normal file
21
var/spack/packages/py-shiboken/package.py
Normal file
@ -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)
|
@ -1,9 +1,10 @@
|
|||||||
from spack import *
|
|
||||||
import spack
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from contextlib import closing
|
from contextlib import closing
|
||||||
|
|
||||||
|
from spack import *
|
||||||
|
import spack
|
||||||
|
|
||||||
|
|
||||||
class Python(Package):
|
class Python(Package):
|
||||||
"""The Python programming language."""
|
"""The Python programming language."""
|
||||||
|
Loading…
Reference in New Issue
Block a user