diff options
author | Hye-Shik Chang <perky@FreeBSD.org> | 2006-06-23 03:54:01 +0000 |
---|---|---|
committer | Hye-Shik Chang <perky@FreeBSD.org> | 2006-06-23 03:54:01 +0000 |
commit | 41a65d90c0bb966972c4a93e2918b427b09bafa8 (patch) | |
tree | 3cbf65bd15f1d42433709dce686191b5fb9514d3 /databases/py-sqlite3 | |
parent | 82357e3da46aeb909d51480bde388e71bb13709f (diff) |
Notes
Diffstat (limited to 'databases/py-sqlite3')
-rw-r--r-- | databases/py-sqlite3/Makefile | 34 | ||||
-rw-r--r-- | databases/py-sqlite3/files/setup.py | 41 | ||||
-rw-r--r-- | databases/py-sqlite3/pkg-descr | 8 | ||||
-rw-r--r-- | databases/py-sqlite3/pkg-message | 7 |
4 files changed, 90 insertions, 0 deletions
diff --git a/databases/py-sqlite3/Makefile b/databases/py-sqlite3/Makefile new file mode 100644 index 000000000000..d742e1b47ef9 --- /dev/null +++ b/databases/py-sqlite3/Makefile @@ -0,0 +1,34 @@ +# New ports collection makefile for: py-sqlite3 +# Date created: 23 June 2006 +# Whom: Hye-Shik Chang +# +# $FreeBSD$ +# + +PORTNAME= sqlite3 +PORTVERSION= ${PYTHON_PORTVERSION} +CATEGORIES= databases python +MASTER_SITES= ${PYTHON_MASTER_SITES} +MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR} +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTFILES= ${PYTHON_DISTFILE} + +MAINTAINER= perky@FreeBSD.org +COMMENT= Standard Python binding to the SQLite3 library + +LIB_DEPENDS= sqlite3.8:${PORTSDIR}/databases/sqlite3 + +PLIST_FILES= lib/%%PYTHON_VERSION%%/site-packages/_sqlite3.so +DIST_SUBDIR= python +USE_PYTHON= 2.5+ +USE_PYDISTUTILS=yes +WRKSRC= ${PYTHON_WRKSRC}/Modules +MD5_FILE= ${PORTSDIR}/lang/python/distinfo + +pre-extract: + @${CAT} ${PKGMESSAGE} + +post-extract: + @${CP} ${FILESDIR}/setup.py ${WRKSRC} + +.include <bsd.port.mk> diff --git a/databases/py-sqlite3/files/setup.py b/databases/py-sqlite3/files/setup.py new file mode 100644 index 000000000000..ec0fd9ccc197 --- /dev/null +++ b/databases/py-sqlite3/files/setup.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python +# To use: +# python setup.py install +# + +__version__ = "$FreeBSD$" + +try: + import distutils + from distutils import sysconfig + from distutils.command.install import install + from distutils.core import setup, Extension +except: + raise SystemExit, "Distutils problem" + +prefix = sysconfig.PREFIX +inc_dirs = [prefix + "/include", "Modules/_sqlite"] +lib_dirs = [prefix + "/lib"] +libs = ["sqlite3"] +macros = [('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'] + +setup(name = "_sqlite3", + description = "SQLite 3 extension to Python", + + ext_modules = [Extension('_sqlite3', sqlite_srcs, + include_dirs = inc_dirs, + libraries = libs, + library_dirs = lib_dirs, + runtime_library_dirs = lib_dirs, + define_macros = macros)] + ) diff --git a/databases/py-sqlite3/pkg-descr b/databases/py-sqlite3/pkg-descr new file mode 100644 index 000000000000..8d91da89239a --- /dev/null +++ b/databases/py-sqlite3/pkg-descr @@ -0,0 +1,8 @@ +SQLite is a library that provides a SQL-language database that +stores data in disk files without requiring a separate server +process. pysqlite provides a SQL interface compliant with the DB-API +2.0 specification described by PEP 249. This means that it should +be possible to write the first version of your applications using +SQLite for data storage. If switching to a larger database such as +PostgreSQL or Oracle is later necessary, the switch should be +relatively easy. diff --git a/databases/py-sqlite3/pkg-message b/databases/py-sqlite3/pkg-message new file mode 100644 index 000000000000..fa94cdeeb335 --- /dev/null +++ b/databases/py-sqlite3/pkg-message @@ -0,0 +1,7 @@ +==== +**CAUTION** +This port installs the sqlite3 module which is distributed as a +part of standard library collection of Python 2.5 and laters. If +you're using Python 2.4 or former, you must install databases/py-pysqlite22 +instead. +==== |