summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sautier.louis@gmail.com>2017-01-19 01:05:31 +0100
committerPatrice Clement <monsieurp@gentoo.org>2017-01-21 22:13:21 +0100
commit1f6996db52c4c09f7e77f30a1177ee066a2766ab (patch)
treee11c5b03f0fe3631c3d8508a5a4153d88e077499 /dev-python/pycups
parentnet-fs/ncpfs: EAPI 6 bump. (diff)
downloadgentoo-1f6996db52c4c09f7e77f30a1177ee066a2766ab.tar.gz
gentoo-1f6996db52c4c09f7e77f30a1177ee066a2766ab.tar.bz2
gentoo-1f6996db52c4c09f7e77f30a1177ee066a2766ab.zip
dev-python/pycups: add Python 3.5 support, missing dep, EAPI=6.
Package-Manager: Portage-2.3.3, Repoman-2.3.1 Closes: https://github.com/gentoo/gentoo/pull/3536
Diffstat (limited to 'dev-python/pycups')
-rw-r--r--dev-python/pycups/pycups-1.9.73-r1.ebuild60
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/pycups/pycups-1.9.73-r1.ebuild b/dev-python/pycups/pycups-1.9.73-r1.ebuild
new file mode 100644
index 000000000000..dbaa8733253e
--- /dev/null
+++ b/dev-python/pycups/pycups-1.9.73-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5} 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 ~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
+}