blob: 993b1044746331bcbc3519802364b09ca4500cbc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
inherit distutils-r1
MY_PN="PyScaffold"
MY_P="${MY_PN}-${PV}"
DESCRIPTION="Tool for easily putting up the scaffold of a Python project"
HOMEPAGE="https://pypi.python.org/pypi/PyScaffold http://pyscaffold.readthedocs.org/"
SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${P}.tar.gz"
SLOT="0"
LICENSE="BSD"
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
IUSE="test"
RDEPEND="
dev-python/six[${PYTHON_USEDEP}]
"
DEPEND="${RDEPEND}
>=dev-python/pbr-1.6[${PYTHON_USEDEP}]
dev-python/setuptools[${PYTHON_USEDEP}]
>=dev-python/setuptools_scm-1.7[${PYTHON_USEDEP}]
test? (
dev-python/pytest[${PYTHON_USEDEP}]
dev-python/pytest-runner[${PYTHON_USEDEP}]
)
"
PATCHES=( "${FILESDIR}"/${P}-loose-dep-restrictions-backport.patch )
python_prepare_all() {
sed \
-e 's: + pytest_runner::g' \
-i setup.py || die
# Creates all sort of mem problem due to fetch restrictions
rm tests/test_install.py || die
# Online tests
sed \
-e 's:test_api_with_cookiecutter:_&:g' \
-e 's:test_pyscaffold_keyword:_&:g' \
-i tests/*py || die
distutils-r1_python_prepare_all
}
python_test() {
git config --global user.email "you@example.com"
git config --global user.name "Your Name"
esetup.py test
}
|