pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/databases/py-sqlite3 Import built-in sqlite support fo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4e1dffa1e1ad
branches:  trunk
changeset: 546312:4e1dffa1e1ad
user:      epg <epg%pkgsrc.org@localhost>
date:      Wed Aug 27 00:28:57 2008 +0000

description:
Import built-in sqlite support for Python 2.5.  The python25 package contains
the .py parts of this, but does not include the .so linked against sqlite3
(similar to the py-expat situation).

diffstat:

 databases/py-sqlite3/DESCR          |   2 ++
 databases/py-sqlite3/Makefile       |  34 ++++++++++++++++++++++++++++++++++
 databases/py-sqlite3/PLIST          |   2 ++
 databases/py-sqlite3/files/setup.py |  33 +++++++++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 0 deletions(-)

diffs (87 lines):

diff -r 63ed8bd530d3 -r 4e1dffa1e1ad databases/py-sqlite3/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/py-sqlite3/DESCR        Wed Aug 27 00:28:57 2008 +0000
@@ -0,0 +1,2 @@
+This is the interface to the SQLite library built into Python starting
+with version 2.5.  It allows Python programs to access SQLite databases.
diff -r 63ed8bd530d3 -r 4e1dffa1e1ad databases/py-sqlite3/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/py-sqlite3/Makefile     Wed Aug 27 00:28:57 2008 +0000
@@ -0,0 +1,34 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/08/27 00:28:57 epg Exp $
+
+PKGNAME=       ${PYPKGPREFIX}-sqlite3-0
+CATEGORIES=    databases python
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://www.python.org/
+COMMENT=       Built-in sqlite support for Python 2.5 and up
+
+PKG_DESTDIR_SUPPORT=   user-destdir
+
+USE_TOOLS+=            patch
+
+EXTRACT_ELEMENTS=      ${PYSUBDIR}/Modules/_sqlite
+
+PYBINMODULE=           yes
+PYDISTUTILSPKG=                yes
+PYTHON_VERSIONS_ACCEPTED=25
+PY_SETUP_SUBST+=       SQLITE_PREFIX=${BUILDLINK_PREFIX.sqlite3}
+
+# ignore errors due to missing files (EXTRACT_ELEMENTS!)
+do-patch:
+       set -e;                                                         \
+       cd ${WRKSRC};                                                   \
+       for f in ${PATCHDIR}/patch-*; do                                \
+               ${PATCH} --batch < "$$f" || ${TRUE};                    \
+       done
+
+BUILDLINK_API_DEPENDS.python25+=       python25>=2.5.2nb2
+
+.include "../../databases/sqlite3/buildlink3.mk"
+.include "../../lang/python/extension.mk"
+.include "../../lang/python/srcdist.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 63ed8bd530d3 -r 4e1dffa1e1ad databases/py-sqlite3/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/py-sqlite3/PLIST        Wed Aug 27 00:28:57 2008 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/08/27 00:28:57 epg Exp $
+${PYSITELIB}/_sqlite3.so
diff -r 63ed8bd530d3 -r 4e1dffa1e1ad databases/py-sqlite3/files/setup.py
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/databases/py-sqlite3/files/setup.py       Wed Aug 27 00:28:57 2008 +0000
@@ -0,0 +1,33 @@
+# $NetBSD
+
+from distutils.core import setup, Extension
+
+sqlite_prefix = '@SQLITE_PREFIX@'
+sqlite_incdir = sqlite_prefix + '/include'
+sqlite_libdir = sqlite_prefix + '/lib'
+
+sqlite_defines = [('MODULE_NAME', '"sqlite3"')]
+
+sqlite_srcs = ['_sqlite/cache.c',
+               '_sqlite/connection.c',
+               '_sqlite/cursor.c',
+               '_sqlite/microprotocols.c',
+               '_sqlite/module.c',
+               '_sqlite/prepare_protocol.c',
+               '_sqlite/row.c',
+               '_sqlite/statement.c',
+               '_sqlite/util.c', ]
+sqlite_srcs = ['Modules/' + x for x in sqlite_srcs]
+
+setup(
+    ext_modules = [
+        Extension('_sqlite3',
+                  sqlite_srcs,
+                  define_macros=sqlite_defines,
+                  include_dirs=["Modules/_sqlite",
+                                sqlite_incdir],
+                  library_dirs=[sqlite_libdir],
+                  runtime_library_dirs=[sqlite_libdir],
+                  libraries=["sqlite3"]),
+        ]
+)



Home | Main Index | Thread Index | Old Index