mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-14 03:10:47 +00:00
d91eb811d5
- Introduce new ports for the sqlalchemy 0.9 and 1.0 release branches. - Deprecate the ports for the 0.6 and 0.7 release branches, as these have been declared EoL and are no longer supported by upstream. - Update to the latest available version in each branch. In detail: Port Version Maintainer ---------------------------------------------- py-sqlalchemy06 0.6.9 nivit@FreeBSD.org (Deprecate 2016-08-20) [1] py-sqlalchemy07 0.7.10 nivit@FreeBSD.org (renamed py-sqlalchemy, Deprecate 2016-08-20) [1] py-sqlalchemy08 0.8.7 nivit@FreeBSD.org (renamed py-sqlalchemy-devel) [1] py-sqlalchemy09 0.9.10 m.tsatsenko@gmail.com (new, repocopy from py-sqlalchemy-devel) [2] py-sqlalchemy10 1.0.13 m.tsatsenko@gmail.com (new, repocopy from py-sqlalchemy-devel) [2] - Use options-helpers and option dependent make targets. - Use autoplist for documents as well as python code - Add all the docments to the packages: previously an arbitrary subset was added in a way that excluded CSS, images and other HTML assets. - Use TEST_DEPENDS and add a TEST_TARGET instead of having a 'TEST' option. - Use py-pytest for 0.9.x and later, rather than py-nose. - Add CONFLICTS_INSTALL between all of the py-sqlalchemyXY ports. PR: 191442 Submitted by: robak Reviewed by: robak Reviewed by: pi Approved by: nivit (maintainer timeout, ~300days) [1] Approved by: m.tsatsenko@gmail.com (maintainer) [2] Sponsored by: https://reviews.freebsd.org/D908
82 lines
2.3 KiB
Makefile
82 lines
2.3 KiB
Makefile
# Created by: Dryice Dong Liu <dryice@dryice.name>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= sqlalchemy
|
|
PORTVERSION= 0.8.7
|
|
CATEGORIES= databases python
|
|
MASTER_SITES= CHEESESHOP
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
PKGNAMESUFFIX= 08
|
|
DISTNAME= SQLAlchemy-${DISTVERSION}
|
|
|
|
MAINTAINER= nivit@FreeBSD.org
|
|
COMMENT= Python SQL toolkit and Object Relational Mapper 0.8.x
|
|
|
|
LICENSE= MIT
|
|
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose \
|
|
${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock
|
|
|
|
USES= python
|
|
USE_PYTHON= distutils autoplist
|
|
|
|
PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER}
|
|
PY2TO3_ARGS= --no-diffs --nobackups --verbose --write
|
|
TEST_TARGET= do-test
|
|
|
|
CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}sqlalchemy{0[679],10}*
|
|
|
|
OPTIONS_DEFINE= DOCS EXAMPLES
|
|
OPTIONS_MULTI= BACKEND
|
|
OPTIONS_MULTI_BACKEND= MSSQL MYSQL PGSQL SQLITE SYBASE
|
|
OPTIONS_DEFAULT= SQLITE
|
|
|
|
MSSQL_DESC= MS SQL Server backend
|
|
SYBASE_DESC= Sybase backend
|
|
|
|
MSSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mssql>0:databases/py-mssql
|
|
PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.0.8:databases/py-psycopg2
|
|
SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3
|
|
SYBASE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sybase>0:databases/py-sybase
|
|
|
|
PORTDOCS= *
|
|
PORTEXAMPLES= *
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${PYTHON_REL} < 3000
|
|
MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:databases/py-MySQLdb
|
|
#.else
|
|
# At the moment databases/py-pymysql does not build with Python3
|
|
# See https://github.com/petehunt/PyMySQL#python-3-0-support
|
|
#MYSQL_RUN_DEPENDS= pymysql>=0.5:databases/py-pymysql
|
|
.endif
|
|
|
|
pre-build:
|
|
.if ${PYTHON_REL} >= 3000
|
|
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/lib
|
|
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/doc
|
|
@${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples
|
|
.endif
|
|
|
|
# C extensions are not supported with all versions of Python, so ignore
|
|
# errors here if there are no .so files to strip.
|
|
post-install:
|
|
-@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/sqlalchemy/*.so
|
|
|
|
post-install-DOCS-on:
|
|
@${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
|
|
|
|
post-install-EXAMPLES-on:
|
|
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
|
|
cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR}
|
|
|
|
do-test:
|
|
.if ${PYTHON_REL} >= 3000
|
|
${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test
|
|
.endif
|
|
@cd ${WRKSRC} && ${PYTHON_CMD} sqla_nose.py
|
|
|
|
.include <bsd.port.post.mk>
|