summaryrefslogtreecommitdiff
path: root/dev-python/databases/databases-0.4.3.ebuild
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2022-04-12 21:03:09 +0000
commitd97953e6ff67978da9554e7b4601aedceb21e215 (patch)
tree674053c902db6972b9716c9ac3b1e960ee7a5358 /dev-python/databases/databases-0.4.3.ebuild
parent1d1fa5bb30df70070bbbbd2b777b839d31f09c41 (diff)
downloadbaldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.gz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.tar.xz
baldeagleos-repo-d97953e6ff67978da9554e7b4601aedceb21e215.zip
Adding metadata
Diffstat (limited to 'dev-python/databases/databases-0.4.3.ebuild')
-rw-r--r--dev-python/databases/databases-0.4.3.ebuild63
1 files changed, 63 insertions, 0 deletions
diff --git a/dev-python/databases/databases-0.4.3.ebuild b/dev-python/databases/databases-0.4.3.ebuild
new file mode 100644
index 000000000000..b490ad3aedce
--- /dev/null
+++ b/dev-python/databases/databases-0.4.3.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9,10} )
+
+DOCS_BUILDER="mkdocs"
+DOCS_DEPEND="dev-python/mkdocs-material"
+
+inherit distutils-r1 docs optfeature
+
+DESCRIPTION="Async database support for Python."
+HOMEPAGE="
+ https://www.encode.io/databases/
+ https://github.com/encode/databases
+"
+SRC_URI="https://github.com/encode/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="<dev-python/sqlalchemy-1.4.0[${PYTHON_USEDEP}]"
+
+BDEPEND="test? (
+ dev-python/aiopg[${PYTHON_USEDEP}]
+ dev-python/aiosqlite[${PYTHON_USEDEP}]
+ dev-python/async_timeout[${PYTHON_USEDEP}]
+ dev-python/asyncpg[${PYTHON_USEDEP}]
+ dev-python/psycopg[${PYTHON_USEDEP}]
+ dev-python/pymysql[${PYTHON_USEDEP}]
+ dev-python/starlette[${PYTHON_USEDEP}]
+)"
+
+distutils_enable_tests pytest
+
+python_prepare_all() {
+ # do not install LICENSE to /usr/
+ sed -i -e '/data_files/d' setup.py || die
+ # fix tests
+ sed -i -e '/databases.backends.mysql/d' tests/test_connection_options.py || die
+
+ distutils-r1_python_prepare_all
+}
+
+python_test() {
+ TEST_DATABASE_URLS="" epytest \
+ --deselect tests/test_connection_options.py::test_mysql_pool_size \
+ --deselect tests/test_connection_options.py::test_mysql_explicit_pool_size \
+ --deselect tests/test_connection_options.py::test_mysql_ssl \
+ --deselect tests/test_connection_options.py::test_mysql_explicit_ssl \
+ --deselect tests/test_connection_options.py::test_mysql_pool_recycle \
+ --deselect tests/test_databases.py \
+ --deselect tests/test_integration.py::test_integration
+}
+
+pkg_postinst() {
+ optfeature "postgresql support" dev-python/asyncpg dev-python/psycopg
+ optfeature "mysql support" dev-python/pymysql
+ optfeature "sqlite support" dev-python/aiosqlite
+ optfeature "postgresql+aiopg support" dev-python/aiopg
+}