2013-03-10 22:52:04 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.20 2013/03/11 02:52:07 espie Exp $
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2009-04-11 09:45:06 -04:00
|
|
|
SHARED_ONLY = Yes
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2009-04-11 09:45:06 -04:00
|
|
|
COMMENT = PostgreSQL database adapter for Python
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2011-05-11 16:56:36 -04:00
|
|
|
MODPY_EGG_VERSION = 2.4.1
|
2009-04-11 09:45:06 -04:00
|
|
|
DISTNAME = psycopg2-${MODPY_EGG_VERSION}
|
|
|
|
PKGNAME = py-${DISTNAME}
|
2011-11-04 04:16:23 -04:00
|
|
|
REVISION = 2
|
2009-04-11 09:45:06 -04:00
|
|
|
CATEGORIES = databases
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2009-04-11 09:45:06 -04:00
|
|
|
HOMEPAGE = http://initd.org/projects/psycopg2
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2009-04-11 09:45:06 -04:00
|
|
|
MAINTAINER = Martynas Venckus <martynas@openbsd.org>
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2008-06-02 13:16:49 -04:00
|
|
|
# GPLv2+
|
2009-04-11 09:45:06 -04:00
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2011-04-09 09:35:13 -04:00
|
|
|
MASTER_SITES = ${MASTER_SITE_PYPI:=p/psycopg2/} \
|
|
|
|
http://initd.org/psycopg/tarballs/PSYCOPG-2-4/
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2009-04-11 09:45:06 -04:00
|
|
|
MODULES = lang/python
|
2010-11-14 19:22:45 -05:00
|
|
|
LIB_DEPENDS = databases/postgresql
|
2011-11-04 04:16:23 -04:00
|
|
|
WANTLIB += pq ${MODPY_WANTLIB}
|
2010-11-14 19:22:45 -05:00
|
|
|
RUN_DEPENDS = databases/postgresql
|
2013-03-10 22:52:04 -04:00
|
|
|
TEST_DEPENDS = ${RUN_DEPENDS}
|
2008-06-02 13:16:49 -04:00
|
|
|
|
|
|
|
# To run the tests, create and start a test database as follows:
|
|
|
|
# createdb psycopg2_test
|
2013-03-10 22:52:04 -04:00
|
|
|
# The test target will use the PSYCOPG2_TESTDB environment
|
2008-06-02 13:16:49 -04:00
|
|
|
# variable to connect to the database; see below for defaults. The
|
2013-03-10 22:52:04 -04:00
|
|
|
# user running the test test will be used to make the connection
|
2008-06-02 13:16:49 -04:00
|
|
|
# and should own the database:
|
|
|
|
# echo "ALTER DATABASE psycopg2_test OWNER TO ${USER};" | \
|
|
|
|
# psql -U postgres
|
2013-03-10 22:52:04 -04:00
|
|
|
TEST_IS_INTERACTIVE = Yes
|
2009-04-11 09:45:06 -04:00
|
|
|
PSYCOPG2_TESTDB? = psycopg2_test
|
2008-01-13 12:06:31 -05:00
|
|
|
|
2007-05-27 10:58:30 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/py-psycopg2
|
2009-04-11 09:45:06 -04:00
|
|
|
cd ${WRKSRC}/doc && pax -rw * ${PREFIX}/share/doc/py-psycopg2/
|
2007-05-27 10:58:30 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/py-psycopg2
|
2009-04-11 09:45:06 -04:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/examples/* \
|
|
|
|
${PREFIX}/share/examples/py-psycopg2/
|
2007-05-27 10:58:30 -04:00
|
|
|
|
2013-03-10 22:52:04 -04:00
|
|
|
do-test: fake
|
2008-06-02 13:16:49 -04:00
|
|
|
cd ${WRKSRC}/tests && ${SETENV} "PYTHONPATH=${WRKINST}${MODPY_SITEPKG}:../" \
|
2009-04-11 09:45:06 -04:00
|
|
|
${MODPY_BIN} ./__init__.py
|
2008-06-02 13:16:49 -04:00
|
|
|
|
2007-05-27 10:58:30 -04:00
|
|
|
.include <bsd.port.mk>
|