Changeset View
Changeset View
Standalone View
Standalone View
databases/py-sqlalchemy07/Makefile
| # Created by: Dryice Dong Liu <dryice@dryice.name> | # Created by: Dryice Dong Liu <dryice@dryice.name> | ||||
| # $FreeBSD$ | # $FreeBSD$ | ||||
| PORTNAME= sqlalchemy | PORTNAME= sqlalchemy | ||||
xmj: PORTNAME= sqlalchemy | |||||
| PORTVERSION= 0.7.10 | PORTVERSION= 0.7.10 | ||||
| PORTREVISION= 2 | PORTREVISION= 3 | ||||
| CATEGORIES= databases python | CATEGORIES= databases python | ||||
| MASTER_SITES= CHEESESHOP | MASTER_SITES= CHEESESHOP | ||||
| PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | ||||
| PKGNAMESUFFIX= 07 | |||||
| DISTNAME= SQLAlchemy-${DISTVERSION} | DISTNAME= SQLAlchemy-${DISTVERSION} | ||||
Not Done Inline ActionsPKGNAMESUFFIX= 07 xmj: PKGNAMESUFFIX= 07 | |||||
| MAINTAINER= nivit@FreeBSD.org | MAINTAINER= nivit@FreeBSD.org | ||||
| COMMENT= Python SQL toolkit and Object Relational Mapper | COMMENT= Python SQL toolkit and Object Relational Mapper 0.7.x | ||||
| LICENSE= MIT | LICENSE= MIT | ||||
| TEST_DEPENDS:= ${RUN_DEPENDS} \ | DEPRECATED= Upstream has declared this version EoL: please migrate to databases/py-sqlalchemy10 | ||||
| ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose | EXPIRATION_DATE= 2016-08-20 | ||||
| # Python3 ready | TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose \ | ||||
Not Done Inline ActionsUSES= python xmj: USES= python | |||||
| ${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock | |||||
Not Done Inline ActionsUSE_PYTHON= distutils autoplist concurrent xmj: USE_PYTHON= distutils autoplist concurrent | |||||
| USES= python | USES= python | ||||
| USE_PYTHON= distutils autoplist | USE_PYTHON= autoplist distutils | ||||
| PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER} | PY2TO3_CMD= ${LOCALBASE}/bin/2to3-${PYTHON_VER} | ||||
| PY2TO3_ARGS= --no-diffs --nobackups --verbose --write | PY2TO3_ARGS= --no-diffs --nobackups --verbose --write | ||||
| TEST_TARGET= do-test | |||||
| OPTIONS_DEFINE= DOCS EXAMPLES TESTS | CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}sqlalchemy{0[689],10}* | ||||
| OPTIONS_DEFINE= DOCS EXAMPLES | |||||
| OPTIONS_MULTI= BACKEND | OPTIONS_MULTI= BACKEND | ||||
| OPTIONS_MULTI_BACKEND= MSSQL MYSQL PGSQL SQLITE SYBASE | OPTIONS_MULTI_BACKEND= FIREBIRD MSSQL MYSQL PGSQL SQLITE SYBASE | ||||
| OPTIONS_DEFAULT= SQLITE | OPTIONS_DEFAULT= SQLITE | ||||
| FIREBIRD_DESC= Firebird backend | |||||
Not Done Inline Actionscandidate for uniquefiles? xmj: candidate for uniquefiles? | |||||
Not Done Inline ActionsOPTIONSFILE override no longer necessary koobs: OPTIONSFILE override no longer necessary | |||||
| MSSQL_DESC= MS SQL Server backend | MSSQL_DESC= MS SQL Server backend | ||||
| TESTS_DESC= Include nose for unit tests | |||||
| SYBASE_DESC= Sybase backend | SYBASE_DESC= Sybase backend | ||||
| .include <bsd.port.options.mk> | FIREBIRD_RUN_DEPENDS= ${PYTHON_SITELIBDIR}/kinterbasdb/__init__.py:databases/kinterbasdb | ||||
Not Done Inline Actionscovered by uniquefiles xmj: covered by uniquefiles | |||||
| 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 | |||||
Not Done Inline Actionsuse options helpers xmj: use options helpers | |||||
| SYBASE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sybase>0:databases/py-sybase | |||||
| DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME} | PORTDOCS= * | ||||
| EXAMPLESDIR= ${PREFIX}/share/examples/${PKGNAMEPREFIX}${PORTNAME} | PORTEXAMPLES= * | ||||
| .include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
Not Done Inline ActionsFIREBIRD_RUN_DEPENDS= ..... xmj: FIREBIRD_RUN_DEPENDS= ..... | |||||
| .if ${PORT_OPTIONS:MDOCS} | .if ${PYTHON_REL} < 3000 | ||||
| AL_PORTDOCS= *.html *.js | MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:databases/py-MySQLdb | ||||
| AL_PORTDOCS_SUBDIR= core dialects orm | |||||
| .endif | |||||
| .if ${PORT_OPTIONS:MMSSQL} | |||||
| RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/pymssql.py:databases/py-mssql | |||||
| .endif | |||||
| .if ${PORT_OPTIONS:MMYSQL} | |||||
| .if ${PYTHON_VER} < 3.0 | |||||
| RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.2:databases/py-MySQLdb | |||||
| #.else | #.else | ||||
| # At the moment databases/py-pymysql does not build with Python3 | # At the moment databases/py-pymysql does not build with Python3 | ||||
| # See https://github.com/petehunt/PyMySQL#python-3-0-support | # See https://github.com/petehunt/PyMySQL#python-3-0-support | ||||
Not Done Inline ActionsMSSQL_RUN_DEPENDS=......... xmj: MSSQL_RUN_DEPENDS=......... | |||||
| #RUN_DEPENDS+= pymysql>=0.5:databases/py-pymysql | #RUN_DEPENDS+= pymysql>=0.5:databases/py-pymysql | ||||
| .endif | .endif | ||||
| .endif | |||||
Not Done Inline ActionsMYSQL_RUN_DEPENDS= koobs: MYSQL_RUN_DEPENDS= | |||||
| .if ${PORT_OPTIONS:MTESTS} | |||||
| BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose | |||||
| .endif | |||||
| .if ${PORT_OPTIONS:MPGSQL} | |||||
| RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}psycopg2>=2.0.8:databases/py-psycopg2 | |||||
| .endif | |||||
| .if ${PORT_OPTIONS:MSQLITE} | |||||
| RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 | |||||
| .endif | |||||
| .if ${PORT_OPTIONS:MSYBASE} | |||||
| RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/Sybase.py:databases/py-sybase | |||||
| .endif | |||||
| post-patch: | post-patch: | ||||
Not Done Inline ActionsUse PYTHON_REL koobs: Use PYTHON_REL | |||||
| ${REINPLACE_CMD} -e 's/import logging/&.handlers/1' -i.bak ${WRKSRC}/test/engine/test_execute.py | ${REINPLACE_CMD} -e 's/import logging/&.handlers/1' -i.bak ${WRKSRC}/test/engine/test_execute.py | ||||
| pre-build: | pre-build: | ||||
| .if ${PYTHON_REL} >= 3000 | .if ${PYTHON_REL} >= 3000 | ||||
| @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/lib | @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/lib | ||||
| @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/doc | |||||
| @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples | |||||
| .endif | .endif | ||||
| # C extensions are not supported with all versions of Python, so ignore | |||||
Not Done Inline ActionsTESTS_BUILD_DEPENDS=... xmj: TESTS_BUILD_DEPENDS=... | |||||
| # errors here if there are no .so files to strip. | |||||
| post-install: | post-install: | ||||
| .if ${PYTHON_REL} >= 3000 | -@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/sqlalchemy/*.so | ||||
| @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/doc | |||||
Not Done Inline ActionsPGSQL_RUN_DEPENDS=.. xmj: PGSQL_RUN_DEPENDS=.. | |||||
| .endif | post-install-DOCS-on: | ||||
| @${MKDIR} ${STAGEDIR}${DOCSDIR} | @${MKDIR} ${STAGEDIR}${DOCSDIR} | ||||
| .for i in ${AL_PORTDOCS} | cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR} | ||||
| ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR} | |||||
| .endfor | |||||
| .for i in ${AL_PORTDOCS_SUBDIR} | |||||
| ${MKDIR} ${STAGEDIR}${DOCSDIR}/${i} | |||||
| @cd ${WRKSRC}/doc/${i} && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}/${i} | |||||
| .endfor | |||||
Not Done Inline ActionsSQLITE_RUN_DEPENDS= xmj: SQLITE_RUN_DEPENDS= | |||||
| post-install-EXAMPLES-on: | |||||
| @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} | @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} | ||||
| .if ${PYTHON_REL} >= 3000 | |||||
| @${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/examples | |||||
| .endif | |||||
| cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} | cd ${WRKSRC}/examples/ && ${COPYTREE_SHARE} . ${STAGEDIR}${EXAMPLESDIR} | ||||
Not Done Inline ActionsSYBASE_RUN_DEPENDS= xmj: SYBASE_RUN_DEPENDS= | |||||
| .if ${PYTHON_REL} < 3000 | do-test: | ||||
| PLIST_SUB+= SPEEDUPS="" | |||||
| .else | |||||
| # C extensions are not supported in py3k | |||||
| PLIST_SUB+= SPEEDUPS="@comment " | |||||
| .endif | |||||
| regression-test: build | |||||
| .if ${PYTHON_REL} >= 3000 | .if ${PYTHON_REL} >= 3000 | ||||
| ${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test | ${PY2TO3_CMD} ${PY2TO3_ARGS} ${WRKSRC}/test | ||||
| .endif | .endif | ||||
Not Done Inline Actions-i.bak is unnecessary xmj: -i.bak is unnecessary | |||||
| @cd ${WRKSRC} && ${PYTHON_CMD} sqla_nose.py | @cd ${WRKSRC} && ${PYTHON_CMD} sqla_nose.py | ||||
| .include <bsd.port.post.mk> | .include <bsd.port.post.mk> | ||||
PORTNAME= sqlalchemy