dev-python/alembic: amd64 stable wrt bug #565742
[gentoo.git] / dev-python / alembic / alembic-0.7.7.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6 PYTHON_COMPAT=( python{2_7,3_3,3_4} )
7
8 inherit distutils-r1
9
10 DESCRIPTION="database migrations tool, written by the author of SQLAlchemy"
11 HOMEPAGE="https://bitbucket.org/zzzeek/alembic"
12 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
13
14 LICENSE="MIT"
15 SLOT="0"
16 KEYWORDS="~amd64 ~x86"
17 IUSE="test doc"
18
19 # requires.txt cites 'SQLAlchemy>=0.7.3' which is really both old and silly
20 # because it shatters the testsuite.  If 'someone' cares to adhere to correct form
21 # and edit to -0.7.3, feel free, and then pick up the pieces.
22 RDEPEND=">=dev-python/sqlalchemy-0.8.4[${PYTHON_USEDEP}]
23         dev-python/mako[${PYTHON_USEDEP}]"
24 DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
25         test? ( ${RDEPEND}
26                 dev-python/nose[${PYTHON_USEDEP}]
27                 dev-python/mock[${PYTHON_USEDEP}] )"
28 # For test phase
29 DISTUTILS_IN_SOURCE_BUILD=1
30
31 python_prepare_all() {
32         # suite passes all if run from source. The residual fail & error are quite erroneous
33         rm tests/test_script_consumption.py
34
35         distutils-r1_python_prepare_all
36 }
37
38 python_test() {
39         ${EPYTHON} run_tests.py || die "Testing failed with ${EPYTHON}"
40 }
41
42 python_install_all() {
43         use doc && local HTML_DOCS=( docs/. )
44
45         distutils-r1_python_install_all
46 }