diff options
author | Goran Mekić <meka@tilda.center> | 2021-12-30 11:19:13 +0900 |
---|---|---|
committer | Hiroki Tagato <tagattie@FreeBSD.org> | 2021-12-30 11:58:27 +0900 |
commit | d025e5c68e7e9a9634fc8f2dc3d7ba129c148d20 (patch) | |
tree | 90759ffb3e38da7c7cc09df1cf9ebbe22ae375d0 /databases/py-databases/Makefile | |
parent | textproc/consul-template: Update to 0.27.2 (diff) |
databases/py-databases: add port: Async database support for Python
Databases gives you simple asyncio support for a range of databases.
It allows you to make queries using the powerful SQLAlchemy Core expression
language, and provides support for PostgreSQL, MySQL, and SQLite.
Databases is suitable for integrating against any async Web framework, such as
Starlette, Sanic, Responder, Quart, aiohttp, Tornado, or FastAPI.
WWW: https://github.com/encode/databases
PR: 257313
Reported by: Goran Mekić <meka@tilda.center> (new maintainer)
Reviewed by: koobs
Diffstat (limited to 'databases/py-databases/Makefile')
-rw-r--r-- | databases/py-databases/Makefile | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/databases/py-databases/Makefile b/databases/py-databases/Makefile new file mode 100644 index 000000000000..376f5dbac05a --- /dev/null +++ b/databases/py-databases/Makefile @@ -0,0 +1,51 @@ +PORTNAME= databases +DISTVERSION= 0.5.3 +CATEGORIES= databases python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= meka@tilda.center +COMMENT= Async database support for Python + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE.md + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sqlalchemy14>=0:databases/py-sqlalchemy14@${PY_FLAVOR} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiomysql>0:databases/py-aiomysql@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}aiopg>0:databases/py-aiopg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}async_timeout>0:devel/py-async_timeout@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}asyncpg>0:databases/py-asyncpg@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}pytest>=0:devel/py-pytest@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}starlette>=0:www/py-starlette@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent distutils + +# USE_GITHUB= yes +# GH_ACCOUNT= encode + +NO_ARCH= yes + +OPTIONS_GROUP= DATABASES +OPTIONS_GROUP_DATABASES= MYSQL PGSQL SQLITE +OPTIONS_DEFAULT= SQLITE +DATABASES_DESC= Database Support + +MYSQL_USES= mysql +MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiomysql>0:databases/py-aiomysql@${PY_FLAVOR} +PGSQL_USES= pgsql +PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiopg>0:databases/py-aiopg@${PY_FLAVOR} +SQLITE_USES= sqlite +SQLITE_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}aiosqlite>0:databases/py-aiosqlite@${PY_FLAVOR} + +# do-test: +# cd ${WRKSRC} && ${SETENV} ${TEST_ENV} TEST_DATABASE_URLS="sqlite:///testsuite" ${PYTHON_CMD} -m pytest -v -rs -o addopts= + +.include <bsd.port.pre.mk> + +.if ${PYTHON_REL} < 30700 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}aiocontextvars>=0:devel/py-aiocontextvars@${PY_FLAVOR} +.endif + +.include <bsd.port.post.mk> |