[Liblas-commits] hg: add buildout configuration
liblas-commits at liblas.org
liblas-commits at liblas.org
Wed Mar 24 23:13:42 EDT 2010
changeset 8c59e277b8be in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=8c59e277b8be
summary: add buildout configuration
diffstat:
buildout/README.txt | 15 ++
buildout/bootstrap.py | 55 ++++++++++
buildout/buildout.cfg | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++
buildout/setenv.in | 5 +
4 files changed, 329 insertions(+), 0 deletions(-)
diffs (truncated from 345 to 300 lines):
diff -r 0b95a35c7f8f -r 8c59e277b8be buildout/README.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildout/README.txt Wed Mar 24 22:08:00 2010 -0500
@@ -0,0 +1,15 @@
+libLAS and friends builout
+==================================
+
+Completely stolen from Shapely/gispython.org
+
+To begin:
+
+ $ virtualenv .
+ $ source ./bin/activate
+ $ python bootstrap.py
+ $ buildout
+ $ . ./setenv
+ $ labpy
+ >>> from osgeo import gdal
+ ...
diff -r 0b95a35c7f8f -r 8c59e277b8be buildout/bootstrap.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildout/bootstrap.py Wed Mar 24 22:08:00 2010 -0500
@@ -0,0 +1,55 @@
+##############################################################################
+#
+# Copyright (c) 2006 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Bootstrap a buildout-based project
+
+Simply run this script in a directory containing a buildout.cfg.
+The script accepts buildout command-line options, so you can
+use the -c option to specify an alternate configuration file.
+
+$Id$
+"""
+
+import os, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+try:
+ import pkg_resources
+except ImportError:
+ ez = {}
+ exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+ import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
diff -r 0b95a35c7f8f -r 8c59e277b8be buildout/buildout.cfg
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/buildout/buildout.cfg Wed Mar 24 22:08:00 2010 -0500
@@ -0,0 +1,254 @@
+[buildout]
+parts =
+ source-svn
+ source-liblas-hg
+ cmake-download
+ cmake-configure
+ cmake-build
+ libtiff
+ libproj
+ libproj-datum
+ libgeos
+ libexpat
+ libspatialite
+ autogen-geotiff
+ libgeotiff
+ autogen-spatialindex
+ libspatialindex
+ rtree
+ libgdal
+ cmake-liblas
+ make-liblas
+ liblas-python
+ setenv
+
+eggs =
+ simplejson
+ geojson
+ numpy
+
+[python]
+executable = ${buildout:directory}/bin/python
+
+[platform]
+so_extension = dylib
+#so_extension = so
+
+[autogen-spatialindex]
+recipe = plone.recipe.command
+command = cd ${source-svn:location}/spatialindex; ./autogen.sh
+update-command = cd ${source-svn:location}/spatialindex; ./autogen.sh
+stop-on-error = yes
+
+[autogen-geotiff]
+recipe = plone.recipe.command
+command = cd ${source-svn:location}/geotiff; ./autogen.sh
+update-command = cd ${source-svn:location}/geotiff; ./autogen.sh
+stop-on-error = yes
+
+[autogen-liblas]
+recipe = plone.recipe.command
+command = cd ${source-liblas-hg:location}; ./autogen.sh
+update-command = cd ${source-svn:location}; ./autogen.sh
+stop-on-error = yes
+
+[source-svn]
+recipe = infrae.subversion
+location = source
+urls =
+ http://svn.gispython.org/svn/spatialindex/spatialindex/trunk spatialindex
+ http://svn.gispython.org/svn/gispy/Rtree/trunk rtree
+ http://svn.osgeo.org/metacrs/geotiff/trunk/libgeotiff geotiff
+ http://svn.osgeo.org/gdal/trunk/gdal gdal
+
+[source-liblas-hg]
+recipe = mercurialrecipe
+repository = http://hg.liblas.org/main
+location = source/liblas
+
+[libspatialindex]
+recipe = hexagonit.recipe.cmmi
+location = ${source-svn:location}/spatialindex
+path =
+ ${source-svn:location}/spatialindex
+configure-options =
+ --enable-debug
+prefix=${buildout:directory}
+
+[rtree]
+recipe = z3c.recipe.egg:setup
+setup = ${source-svn:location}/rtree
+egg = Rtree
+args =
+ clean
+ build
+ test
+ install
+include-dirs =
+ ${libspatialindex:location}/include
+library-dirs =
+ ${libspatialindex:location}/lib
+rpath =
+ ${libspatialindex:location}/lib
+libraries = spatialindex
+
+
+
+[cmake-liblas]
+recipe = plone.recipe.command
+command =
+ cd ${source-liblas-hg:location}; \
+ ${buildout:directory}/bin/cmake \
+ -DCMAKE_INSTALL_PREFIX:PATH=${buildout:directory} \
+ -DGDAL_INCLUDE_DIR:PATH=${buildout:directory}/include \
+ -DGDAL_LIBRARY:STRING=${buildout:directory}/lib/libgdal.${platform:so_extension} \
+ -DGEOTIFF_INCLUDE_DIR:PATH=${buildout:directory}/include \
+ -DGEOTIFF_LIBRARY:FILEPATH=${buildout:directory}/lib/libgeotiff.${platform:so_extension} \
+ -DSPATIALINDEX_INCLUDE_DIR:PATH=${buildout:directory}/include \
+ -DSPATIALINDEX_LIBRARY:FILEPATH=${buildout:directory}/lib/libspatialindex.${platform:so_extension} \
+ -DTIFF_INCLUDE_DIR:PATH=${buildout:directory}/include \
+ -DTIFF_LIBRARY:FILEPATH=${buildout:directory}/lib/libtiff.${platform:so_extension} \
+ -DWITH_GEOTIFF:BOOL=ON \
+ -DWITH_GDAL:BOOL=ON \
+ -DWITH_SPATIALINDEX:BOOL=ON \
+ .
+stop-on-error = yes
+
+[make-liblas]
+recipe = plone.recipe.command
+command =
+ cd ${source-liblas-hg:location}; \
+ make ; make install
+stop-on-error = yes
+
+[libproj-datum]
+recipe = hexagonit.recipe.download
+url = http://download.osgeo.org/proj/proj-datumgrid-1.5.zip
+destination = ${libproj:location}/share/proj/
+
+[cmake-download]
+recipe = hexagonit.recipe.download
+url = http://www.cmake.org/files/v2.8/cmake-2.8.1.tar.gz
+destination = ${buildout:directory}/source/cmake
+
+[cmake-configure]
+recipe = plone.recipe.command
+command = cd ${buildout:directory}/source/cmake/cmake-2.8.1; ./bootstrap --prefix=${buildout:directory}
+stop-on-error = yes
+
+[cmake-build]
+recipe = plone.recipe.command
+command = cd ${buildout:directory}/source/cmake/cmake-2.8.1; make;make install
+stop-on-error = yes
+
+[libtiff]
+recipe = hexagonit.recipe.cmmi
+url = http://download.osgeo.org/libtiff/tiff-4.0.0beta5.tar.gz
+prefix=${buildout:directory}
+
+[libproj]
+recipe = hexagonit.recipe.cmmi
+url = http://download.osgeo.org/proj/proj-4.7.0.tar.gz
+prefix=${buildout:directory}
+
+[libgeotiff]
+recipe = hexagonit.recipe.cmmi
+location = ${source-svn:location}/geotiff
+path =
+ ${source-svn:location}/geotiff
+configure-options =
+ --with-libtiff=${libtiff:location}
+ --with-proj=${libproj:location}
+prefix=${buildout:directory}
+
+[libgeos]
+recipe = hexagonit.recipe.cmmi
+url = http://download.osgeo.org/geos/geos-3.2.0.tar.bz2
+prefix=${buildout:directory}
+
+[libexpat]
+recipe = hexagonit.recipe.cmmi
+url = http://sourceforge.net/projects/expat/files/expat/2.0.1/expat-2.0.1.tar.gz/download
+prefix=${buildout:directory}
+
+[libspatialite]
+recipe = hexagonit.recipe.cmmi
+url = http://www.gaia-gis.it/spatialite/libspatialite-amalgamation-2.3.1.tar.gz
+configure-options =
+ --with-proj=${libproj:location}
+ --with-geos=${libgeos:location}
+prefix=${buildout:directory}
+
+[libgdal]
+recipe = hexagonit.recipe.cmmi
+location = ${source-svn:location}/gdal
+path =
+ ${source-svn:location}/gdal
+configure-options =
+ --enable-debug
+ --with-proj=${buildout:directory}
+ --with-libtiff=${buildout:directory}
+ --with-geotiff=${buildout:directory}
+ --with-png=internal
+ --with-jpeg=internal
+ --with-geos=${buildout:directory}/bin/geos-config
+ --without-python
+ --without-xerces
+ --with-expat=${buildout:directory}
+ --with-spatialite=${buildout:directory}
+prefix=${buildout:directory}
+
+[liblas-python]
+recipe = z3c.recipe.egg:setup
+setup = ${source-svn:location}/liblas/python
+args =
+ clean
+ build
+ test
+ install
+egg = libLAS
+include-dirs =
+ ${buildout:directory}/include
+library-dirs =
+ ${buildout:directory}/lib
+rpath =
+ ${buildout:directory}/lib
+libraries = liblas_c
+
+#
More information about the Liblas-commits
mailing list