commit:     78e94b3488ba2604057f1a8acea8819f984bf8ea
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  2 14:03:43 2019 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Sun Jun  2 14:03:43 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=78e94b34

dev-python/pycups: works with python 3.7

Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org>

 dev-python/pycups/pycups-1.9.73-r2.ebuild | 59 +++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/dev-python/pycups/pycups-1.9.73-r2.ebuild 
b/dev-python/pycups/pycups-1.9.73-r2.ebuild
new file mode 100644
index 00000000000..2476fd0819b
--- /dev/null
+++ b/dev-python/pycups/pycups-1.9.73-r2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python{2_7,3_5,3_6,3_7} pypy )
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for the CUPS API"
+HOMEPAGE="http://cyberelk.net/tim/data/pycups/";
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86"
+SLOT="0"
+IUSE="doc examples"
+
+RDEPEND="
+       net-print/cups
+"
+DEPEND="
+       dev-python/setuptools[${PYTHON_USEDEP}]
+       ${RDEPEND}
+"
+
+# epydoc kinda sucks and supports python2 only (it's dead too),
+# and since we're dealing with a binary module we need exact version
+# match. therefore, docbuilding *requires* any python2 being enabled.
+
+DEPEND="${RDEPEND}
+       doc? ( dev-python/epydoc[$(python_gen_usedep 'python2*')] )
+"
+
+REQUIRED_USE="doc? ( || ( $(python_gen_useflags 'python2*') ) )"
+
+pkg_setup() {
+       use doc && DISTUTILS_ALL_SUBPHASE_IMPLS=( python2.7 )
+}
+
+python_compile() {
+       python_is_python3 || local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
+       distutils-r1_python_compile
+}
+
+python_compile_all() {
+       if use doc; then
+               # we can't use Makefile since it relies on hardcoded paths
+               epydoc -o html --html cups || die "doc build failed"
+               HTML_DOCS=( html/. )
+       fi
+}
+
+python_install_all() {
+       if use examples; then
+               dodoc -r examples
+               docompress -x /usr/share/doc/${PF}/examples
+       fi
+       distutils-r1_python_install_all
+}

Reply via email to