mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-12 08:33:15 -04:00
dev-python/databases: add 0.6.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST databases-0.5.3.tar.gz 28342 BLAKE2B dcf8533a49b92a325bfda1440fd5bac3f9bd69751496c6fcdf72c422cc19c552a7458dc4ea0607a2a1ad9ade9afbb8cac00e178c29b6b11f7011bd4eae1f70a0 SHA512 bd0c4f1bf0f81e017ea55e41a6d4821ee17e0f995b600a50955fba68841443147dd234534b9c72d753b99785a5a08ac6e3d839894ec4760c602372cccbd4c1c0
|
||||
DIST databases-0.6.1.tar.gz 31487 BLAKE2B b325112c7bcab133d113e8f652d636f26fccff7ec4849868ef8b437ed1939d01819bce63f7962edab030c6b3a232c5908b28cefa20fae3be28a4db1662c64b34 SHA512 6573dbe9158963e8fc3a79ad32a2c17bac1c1a58fc436f2a8223f8c390b264e814a08c807f59e5c8c54f1769a804ead47f9b44622c363da0cc74528d87b1484e
|
||||
|
||||
96
dev-python/databases/databases-0.6.1.ebuild
Normal file
96
dev-python/databases/databases-0.6.1.ebuild
Normal file
@@ -0,0 +1,96 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{8..11} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
|
||||
DOCS_BUILDER="mkdocs"
|
||||
DOCS_DEPEND="dev-python/mkdocs-material"
|
||||
|
||||
inherit databases 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.41[${PYTHON_USEDEP}]"
|
||||
BDEPEND="test? (
|
||||
dev-python/aiomysql[${PYTHON_USEDEP}]
|
||||
dev-python/aiopg[${PYTHON_USEDEP}]
|
||||
dev-python/aiosqlite[${PYTHON_USEDEP}]
|
||||
dev-python/async-timeout[${PYTHON_USEDEP}]
|
||||
dev-python/asyncmy[${PYTHON_USEDEP}]
|
||||
dev-python/asyncpg[${PYTHON_USEDEP}]
|
||||
dev-python/psycopg:2[${PYTHON_USEDEP}]
|
||||
dev-python/pymysql[${PYTHON_USEDEP}]
|
||||
dev-python/sqlalchemy[sqlite,${PYTHON_USEDEP}]
|
||||
dev-python/starlette[${PYTHON_USEDEP}]
|
||||
)"
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
EEPYTEST_DESELECT=(
|
||||
tests/test_connection_options.py::test_mysql_pool_size
|
||||
tests/test_connection_options.py::test_mysql_explicit_pool_size
|
||||
tests/test_connection_options.py::test_mysql_ssl
|
||||
tests/test_connection_options.py::test_mysql_explicit_ssl
|
||||
tests/test_connection_options.py::test_mysql_pool_recycle
|
||||
tests/test_databases.py
|
||||
tests/test_integration.py::test_integration
|
||||
)
|
||||
|
||||
python_prepare_all() {
|
||||
# fix tests
|
||||
#sed -i -e '/databases.backends.mysql/d' tests/test_connection_options.py || die
|
||||
|
||||
distutils-r1_python_prepare_all
|
||||
}
|
||||
|
||||
src_test() {
|
||||
local databases=(
|
||||
"sqlite:///testsuite"
|
||||
"sqlite+aiosqlite:///testsuite"
|
||||
"mysql://root@127.0.0.1:3333/testsuite"
|
||||
"mysql+aiomysql://root@127.0.0.1:3333/testsuite"
|
||||
"mysql+asyncmy://root@127.0.0.1:3333/testsuite"
|
||||
"postgresql://postgres@127.0.0.1:65432/"
|
||||
"postgresql+aiopg://postgres@127.0.0.1:65432/"
|
||||
"postgresql+asyncpg://postgres@127.0.0.1:65432/"
|
||||
)
|
||||
|
||||
local -x TEST_DATABASE_URLS=$(printf "%s," "${databases[@]}")
|
||||
TEST_DATABASE_URLS=${TEST_DATABASE_URLS::-1}
|
||||
|
||||
emysql --start 3333
|
||||
epostgres --start 65432
|
||||
|
||||
ebegin "Creating mysql database 'testsuite'"
|
||||
mysql --user=root --socket=$(emysql --get-sockfile) --silent \
|
||||
--execute="CREATE DATABASE testsuite;"
|
||||
eend $? || emysql --die "Creating mysql database failed"
|
||||
|
||||
distutils-r1_src_test
|
||||
|
||||
emysql --stop
|
||||
epostgres--stop
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
optfeature "fancy logs" dev-python/click
|
||||
optfeature "mysql support" dev-python/pymysql
|
||||
optfeature "mysql+aiomysql support" dev-python/aiomysql
|
||||
optfeature "mysql+asyncmy support" dev-python/asyncmy
|
||||
optfeature "postgresql support" dev-python/psycopg:2
|
||||
optfeature "postgresql+asyncpg support" dev-python/asyncpg
|
||||
optfeature "postgresql+aiopg support" dev-python/aiopg
|
||||
optfeature "sqlite+aiosqlite support" dev-python/aiosqlite
|
||||
}
|
||||
Reference in New Issue
Block a user