# Created by: Dryice Dong Liu # $FreeBSD$ PORTNAME= sqlalchemy PORTVERSION= 0.7.10 PORTREVISION= 3 CATEGORIES= databases python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} PKGNAMESUFFIX= 07 DISTNAME= SQLAlchemy-${DISTVERSION} MAINTAINER= nivit@FreeBSD.org COMMENT= Python SQL toolkit and Object Relational Mapper 0.7.x LICENSE= MIT DEPRECATED= Upstream has declared this version EoL: please migrate to databases/py-sqlalchemy10 EXPIRATION_DATE= 2016-08-20 TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose \ ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock USES= python USE_PYTHON= autoplist distutils PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER} PY2TO3_ARGS= --no-diffs --nobackups --verbose --write TEST_TARGET= do-test CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}sqlalchemy{0[689],10}* OPTIONS_DEFINE= DOCS EXAMPLES OPTIONS_MULTI= BACKEND OPTIONS_MULTI_BACKEND= FIREBIRD MSSQL MYSQL PGSQL SQLITE SYBASE OPTIONS_DEFAULT= SQLITE FIREBIRD_DESC= Firebird backend MSSQL_DESC= MS SQL Server backend SYBASE_DESC= Sybase backend FIREBIRD_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/kinterbasdb/__init__.py:databases/kinterbasdb 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 .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 #RUN_DEPENDS+= pymysql>=0.5:databases/py-pymysql .endif post-patch: ${REINPLACE_CMD} -e 's/import logging/&.handlers/1' -i.bak ${WRKSRC}/test/engine/test_execute.py 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