[96760] trunk/dports/python
and.damore at macports.org
and.damore at macports.org
Sat Aug 18 07:51:31 PDT 2012
Revision: 96760
https://trac.macports.org/changeset/96760
Author: and.damore at macports.org
Date: 2012-08-18 07:51:27 -0700 (Sat, 18 Aug 2012)
Log Message:
-----------
new port py-spatialite
Added Paths:
-----------
trunk/dports/python/py-spatialite/
trunk/dports/python/py-spatialite/Portfile
trunk/dports/python/py-spatialite/files/
trunk/dports/python/py-spatialite/files/patch-lib_dbapi2_py.diff
trunk/dports/python/py-spatialite/files/patch-setup_py.diff
Added: trunk/dports/python/py-spatialite/Portfile
===================================================================
--- trunk/dports/python/py-spatialite/Portfile (rev 0)
+++ trunk/dports/python/py-spatialite/Portfile 2012-08-18 14:51:27 UTC (rev 96760)
@@ -0,0 +1,52 @@
+# $Id$
+
+PortSystem 1.0
+PortGroup python 1.0
+name py-spatialite
+
+# pyspatialite comes in several flavors according the spatialite API it's going to work with
+version 2.6.2
+set spatialite-compat "-spatialite.2.3.1"
+
+license ZLIB
+maintainers and.damore openmaintainer
+description Python interface to SQLite 3 and Spatialite
+long_description \
+ pyspatialite is an interface to the SQLite 3.x embedded relational database \
+ engine with spatialite extensions. It is almost fully compliant with the Python \
+ database API version 2.0 also exposes the unique features of SQLite and \
+ spatialite.
+
+platforms darwin
+
+homepage http://pypi.python.org/pypi/pyspatialite/${version}${spatialite-compat}
+master_sites http://pypi.python.org/packages/source/p/pyspatialite
+distname pyspatialite-${version}${spatialite-compat}
+
+checksums md5 9b996455e8080dbeef5f0cdcb23c16e0 \
+ sha1 f4b2785f2da727eab36297653ec330b7ad7fd114 \
+ rmd160 d3a2717cb91c774b4e8714b097cb0d0018ad67d3
+
+# have to check if it works with 3.x
+python.versions 24 25 26 27
+python.default_version 27
+
+if {${subport} != ${name}} {
+ depends_lib port:spatialite \
+ port:geos \
+ port:proj
+
+ patchfiles patch-setup_py.diff \
+ patch-lib_dbapi2_py.diff
+
+ post-destroot {
+ xinstall -d ${destroot}${python.prefix}/share/doc/${subport}
+ file copy ${worksrcpath}/doc ${destroot}${python.prefix}/share/doc/${subport}
+ file copy ${worksrcpath}/LICENSE ${destroot}${python.prefix}/share/doc/${subport}
+ file delete -force ${destroot}${python.prefix}/pyspatialite-doc
+ }
+}
+
+livecheck.url [lindex ${master_sites} 0]
+livecheck.regex "pyspatialite-(\\d+(?:\\.\\d+)*)-spatialite.2.3.1${extract.suffix}"
+
Property changes on: trunk/dports/python/py-spatialite/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/python/py-spatialite/files/patch-lib_dbapi2_py.diff
===================================================================
--- trunk/dports/python/py-spatialite/files/patch-lib_dbapi2_py.diff (rev 0)
+++ trunk/dports/python/py-spatialite/files/patch-lib_dbapi2_py.diff 2012-08-18 14:51:27 UTC (rev 96760)
@@ -0,0 +1,11 @@
+--- lib/dbapi2.py.orig 2012-08-18 14:35:30.000000000 +0200
++++ lib/dbapi2.py 2012-08-18 14:35:53.000000000 +0200
+@@ -47,7 +47,7 @@
+ def TimestampFromTicks(ticks):
+ return Timestamp(*time.localtime(ticks)[:6])
+
+-version_info = tuple([int(x) for x in version.split(".")])
++version_info = tuple([int(x) for x in version.split("-")[0].split(".")])
+ sqlite_version_info = tuple([int(x) for x in sqlite_version.split(".")])
+
+ Binary = buffer
Added: trunk/dports/python/py-spatialite/files/patch-setup_py.diff
===================================================================
--- trunk/dports/python/py-spatialite/files/patch-setup_py.diff (rev 0)
+++ trunk/dports/python/py-spatialite/files/patch-setup_py.diff 2012-08-18 14:51:27 UTC (rev 96760)
@@ -0,0 +1,16 @@
+--- setup.py.orig 2012-08-18 16:47:34.000000000 +0200
++++ setup.py 2012-08-18 16:47:54.000000000 +0200
+@@ -117,12 +117,7 @@
+ # sometimes iconv is built in, sometimes it isn't
+ if not self.compiler.has_function("iconv"):
+ ext.libraries.append("iconv")
+-
+- #Default locations for Mac
+- ext.include_dirs.append("/Library/Frameworks/GEOS.framework/unix/include/")
+- ext.include_dirs.append("/Library/Frameworks/PROJ.framework/unix/include/")
+- ext.library_dirs.append("/Library/Frameworks/GEOS.framework/unix/lib")
+- ext.library_dirs.append("/Library/Frameworks/PROJ.framework/unix/lib")
++ ext.libraries.append("charset")
+
+ ext.define_macros.append(("SQLITE_ENABLE_FTS3", "1")) # build with fulltext search enabled
+ ext.define_macros.append(("SQLITE_ENABLE_RTREE", "1")) # build with fulltext search enabled
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120818/9b81773c/attachment.html>
More information about the macports-changes
mailing list