*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / sqlalchemy-rqlite / sqlalchemy-rqlite-1.0.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5 PYTHON_COMPAT=( python3_6 )
6
7 inherit distutils-r1
8
9 if [[ ${PV} == *9999* ]]; then
10         inherit git-r3
11 fi
12
13 DESCRIPTION="A SQLAlchemy dialect for rqlite"
14 EGIT_REPO_URI="https://github.com/rqlite/sqlalchemy-rqlite.git"
15 HOMEPAGE="https://github.com/rqlite/sqlalchemy-rqlite"
16 SRC_URI="${EGIT_REPO_URI%.git}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
17
18 LICENSE="MIT"
19 SLOT="0"
20 KEYWORDS="~amd64 ~x86"
21 IUSE="test"
22 RESTRICT="!test? ( test )"
23
24 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
25         dev-python/pyrqlite[${PYTHON_USEDEP}]
26         dev-python/sqlalchemy[${PYTHON_USEDEP}]
27         test? (
28                 dev-python/pytest[${PYTHON_USEDEP}]
29                 dev-python/pytest-cov[${PYTHON_USEDEP}]
30                 dev-python/pylint[${PYTHON_USEDEP}]
31         )"
32
33 src_prepare() {
34         sed -e "s:^__version__ = .*:__version__ = '${PV}':" -i src/sqlalchemy_rqlite/constants.py || die
35         distutils-r1_src_prepare
36 }
37
38 python_test() {
39         esetup.py test || die "tests failed"
40         esetup.py lint -f text -E || die "pylint failed"
41 }