1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-23 09:10:43 +00:00

Add new port for python sqlite3 module.

This port installs a Python "standard" library version of pysqlite
which is provided by databases/py-pysqlite22 already.  Because
sqlite3 module was introduced in Python 2.5, this port plays only
for 2.5 or laters.

See Also:	http://docs.python.org/dev/lib/module-sqlite3.html
This commit is contained in:
Hye-Shik Chang 2006-06-23 03:54:01 +00:00
parent 82357e3da4
commit 41a65d90c0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=166074
5 changed files with 91 additions and 0 deletions

View File

@ -387,6 +387,7 @@
SUBDIR += py-oops
SUBDIR += py-psycopg
SUBDIR += py-pyPgSQL
SUBDIR += py-sqlite3
SUBDIR += py-sqlobject
SUBDIR += py-sqlrelay
SUBDIR += py-sybase

View File

@ -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>

View File

@ -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)]
)

View File

@ -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.

View File

@ -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.
====