Gentoo Archives: gentoo-commits

From: Alexey Shvetsov <alexxy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pycups/
Date: Sun, 02 Jun 2019 14:05:09
Message-Id: 1559484223.78e94b3488ba2604057f1a8acea8819f984bf8ea.alexxy@gentoo
1 commit: 78e94b3488ba2604057f1a8acea8819f984bf8ea
2 Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jun 2 14:03:43 2019 +0000
4 Commit: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
5 CommitDate: Sun Jun 2 14:03:43 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e94b34
7
8 dev-python/pycups: works with python 3.7
9
10 Package-Manager: Portage-2.3.67, Repoman-2.3.13
11 Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>
12
13 dev-python/pycups/pycups-1.9.73-r2.ebuild | 59 +++++++++++++++++++++++++++++++
14 1 file changed, 59 insertions(+)
15
16 diff --git a/dev-python/pycups/pycups-1.9.73-r2.ebuild b/dev-python/pycups/pycups-1.9.73-r2.ebuild
17 new file mode 100644
18 index 00000000000..2476fd0819b
19 --- /dev/null
20 +++ b/dev-python/pycups/pycups-1.9.73-r2.ebuild
21 @@ -0,0 +1,59 @@
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,3_6,3_7} pypy )
28 +inherit distutils-r1
29 +
30 +DESCRIPTION="Python bindings for the CUPS API"
31 +HOMEPAGE="http://cyberelk.net/tim/data/pycups/"
32 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
33 +
34 +LICENSE="GPL-2"
35 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
36 +SLOT="0"
37 +IUSE="doc examples"
38 +
39 +RDEPEND="
40 + net-print/cups
41 +"
42 +DEPEND="
43 + dev-python/setuptools[${PYTHON_USEDEP}]
44 + ${RDEPEND}
45 +"
46 +
47 +# epydoc kinda sucks and supports python2 only (it's dead too),
48 +# and since we're dealing with a binary module we need exact version
49 +# match. therefore, docbuilding *requires* any python2 being enabled.
50 +
51 +DEPEND="${RDEPEND}
52 + doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )
53 +"
54 +
55 +REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
56 +
57 +pkg_setup() {
58 + use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
59 +}
60 +
61 +python_compile() {
62 + python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
63 + distutils-r1_python_compile
64 +}
65 +
66 +python_compile_all() {
67 + if use doc; then
68 + # we can't use Makefile since it relies on hardcoded paths
69 + epydoc -o html --html cups || die "doc build failed"
70 + HTML_DOCS=( html/. )
71 + fi
72 +}
73 +
74 +python_install_all() {
75 + if use examples; then
76 + dodoc -r examples
77 + docompress -x /usr/share/doc/${PF}/examples
78 + fi
79 + distutils-r1_python_install_all
80 +}