Files
guru/dev-python/databases/databases-0.4.1.ebuild
T

62 lines
1.7 KiB
Bash
Raw Normal View History

# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8} )
2020-12-06 11:19:53 +01:00
DOCS_BUILDER="mkdocs"
DOCS_DEPEND="dev-python/mkdocs-material"
2020-05-02 11:53:41 +02:00
2020-09-24 14:42:41 +02:00
inherit distutils-r1 docs optfeature
DESCRIPTION="Async database support for Python."
HOMEPAGE="
2020-03-18 19:56:15 +01:00
https://www.encode.io/databases/
https://github.com/encode/databases
"
2020-03-18 19:56:15 +01:00
SRC_URI="https://github.com/encode/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"
2020-03-18 19:56:15 +01:00
IUSE="doc"
# Requires 'TEST_DATABASE_URLS' to be set
# but to what, there is no documentation on this
# besides this looks like it requires internet so it will fail anyway
# To fix this, the whole 'TEST_DATABASE_URLS' stuff should probably be commented out
# or we download whatever 'TEST_DATABASE_URLS' is supposed to point at and the variable
# to that local directory
RESTRICT="test"
2020-09-24 14:46:09 +02:00
RDEPEND=">=dev-python/sqlalchemy-1.3.0[${PYTHON_USEDEP}]"
2020-03-18 19:56:15 +01:00
# autoflake, codecov also required for tests?
2020-03-18 19:56:15 +01:00
DEPEND="test? (
dev-python/aiomysql[${PYTHON_USEDEP}]
dev-python/aiopg[${PYTHON_USEDEP}]
dev-python/aiosqlite[${PYTHON_USEDEP}]
dev-python/asyncpg[${PYTHON_USEDEP}]
dev-python/psycopg[${PYTHON_USEDEP}]
dev-python/pymysql[${PYTHON_USEDEP}]
dev-python/starlette[${PYTHON_USEDEP}]
2020-09-24 14:42:41 +02:00
dev-python/requests[${PYTHON_USEDEP}]
)"
2020-05-02 11:53:41 +02:00
distutils_enable_tests pytest
python_prepare_all() {
2020-03-18 19:56:15 +01:00
# do not install LICENSE to /usr/
sed -i -e '/data_files/d' setup.py || die
2020-03-18 19:56:15 +01:00
distutils-r1_python_prepare_all
}
pkg_postinst() {
2020-03-18 19:56:15 +01:00
optfeature "postgresql support" dev-python/asyncpg dev-python/psycopg
optfeature "mysql support" dev-python/aiomysql dev-python/pymysql
optfeature "sqlite support" dev-python/aiosqlite
2020-03-18 19:56:15 +01:00
optfeature "postgresql+aiopg support" dev-python/aiopg
}