dev-python/alembic: 1.4.2 allarches stablized
[gentoo.git] / dev-python / alembic / alembic-1.4.2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python3_{6,7,8} )
7 inherit distutils-r1
8
9 DESCRIPTION="database migrations tool, written by the author of SQLAlchemy"
10 HOMEPAGE="https://bitbucket.org/zzzeek/alembic"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="MIT"
14 SLOT="0"
15 KEYWORDS="amd64 ~arm64 x86"
16 IUSE="test doc"
17 RESTRICT="!test? ( test )"
18
19 RDEPEND=">=dev-python/sqlalchemy-1.1.0[${PYTHON_USEDEP}]
20         dev-python/mako[${PYTHON_USEDEP}]
21         >=dev-python/python-editor-0.3[${PYTHON_USEDEP}]
22         dev-python/python-dateutil[${PYTHON_USEDEP}]"
23 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
24         test? ( ${RDEPEND}
25                 dev-python/nose[${PYTHON_USEDEP}]
26                 dev-python/mock[${PYTHON_USEDEP}] )"
27 # For test phase
28 DISTUTILS_IN_SOURCE_BUILD=1
29
30 python_prepare_all() {
31         # suite passes all if run from source. The residual fail & error are quite erroneous
32         rm tests/test_script_consumption.py || die
33
34         distutils-r1_python_prepare_all
35 }
36
37 python_test() {
38         ${EPYTHON} run_tests.py || die "Testing failed with ${EPYTHON}"
39 }
40
41 python_install_all() {
42         use doc && local HTML_DOCS=( docs/. )
43
44         distutils-r1_python_install_all
45 }