1 |
commit: 65a72e8ad95f41c6e3eef415ad17866e60024526 |
2 |
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 27 16:16:47 2019 +0000 |
4 |
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 27 16:17:50 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65a72e8a |
7 |
|
8 |
dev-python/cssutils: Python 3.8 |
9 |
|
10 |
Signed-off-by: Sebastian Pipping <sping <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.83, Repoman-2.3.20 |
12 |
|
13 |
dev-python/cssutils/cssutils-1.0.2-r2.ebuild | 55 ++++++++++++++++++++++++++++ |
14 |
1 file changed, 55 insertions(+) |
15 |
|
16 |
diff --git a/dev-python/cssutils/cssutils-1.0.2-r2.ebuild b/dev-python/cssutils/cssutils-1.0.2-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..35034fb6e40 |
19 |
--- /dev/null |
20 |
+++ b/dev-python/cssutils/cssutils-1.0.2-r2.ebuild |
21 |
@@ -0,0 +1,55 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python{2_7,3_{5,6,7,8}} pypy ) |
28 |
+ |
29 |
+inherit distutils-r1 |
30 |
+ |
31 |
+DESCRIPTION="A CSS Cascading Style Sheets library" |
32 |
+HOMEPAGE="https://pypi.org/project/cssutils/ https://bitbucket.org/cthedot/cssutils http://cthedot.de/cssutils/" |
33 |
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
34 |
+ |
35 |
+LICENSE="GPL-3" |
36 |
+SLOT="0" |
37 |
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86" |
38 |
+IUSE="test" |
39 |
+RESTRICT="!test? ( test )" |
40 |
+ |
41 |
+RDEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" |
42 |
+DEPEND="${RDEPEND} |
43 |
+ test? ( |
44 |
+ dev-python/mock[${PYTHON_USEDEP}] |
45 |
+ dev-python/nose[${PYTHON_USEDEP}] |
46 |
+ )" |
47 |
+ |
48 |
+python_prepare_all() { |
49 |
+ # Disable test failing with dev-python/pyxml installed. |
50 |
+ if has_version dev-python/pyxml; then |
51 |
+ sed -e "s/test_linecol/_&/" \ |
52 |
+ -i src/cssutils/tests/test_errorhandler.py \ |
53 |
+ || die |
54 |
+ fi |
55 |
+ |
56 |
+ # requires old pbr, does it really? |
57 |
+ sed \ |
58 |
+ -e '/tests_require/d' \ |
59 |
+ -i setup.py || die |
60 |
+ |
61 |
+ # fix casing of call to Windows-1252. Remove when upstream fixes casing. |
62 |
+ sed -i -e 's/encutils.tryEncodings(test)/encutils.tryEncodings(test).lower()/' \ |
63 |
+ src/cssutils/tests/test_encutils/__init__.py || die "fixing test_encutils failed" |
64 |
+ |
65 |
+ distutils-r1_python_prepare_all |
66 |
+} |
67 |
+ |
68 |
+python_test() { |
69 |
+ ln -s "${S}/sheets" "${BUILD_DIR}/sheets" || die |
70 |
+ # esetup.py test |
71 |
+ # exclude tests that connect to the network |
72 |
+ set -- nosetests \ |
73 |
+ -e test_parseUrl -e test_handlers -P "${BUILD_DIR}/lib/cssutils/tests" |
74 |
+ echo "$@" |
75 |
+ "$@" || die "Testing failed with ${EPYTHON}" |
76 |
+} |