summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLouis Sautier <sbraz@gentoo.org>2021-08-22 13:52:10 +0200
committerLouis Sautier <sbraz@gentoo.org>2021-08-22 14:34:00 +0200
commit2c6c69aec374e07d1089d276bce3f78b4b033003 (patch)
tree00daee9f3eb861e6002061ba289df21b30ea2414 /dev-python/pycups
parentdev-python/pycups: add github upstream metadata (diff)
downloadgentoo-2c6c69aec374e07d1089d276bce3f78b4b033003.tar.gz
gentoo-2c6c69aec374e07d1089d276bce3f78b4b033003.tar.bz2
gentoo-2c6c69aec374e07d1089d276bce3f78b4b033003.zip
dev-python/pycups: add 2.0.1, enable py3.10, update HOMEPAGE
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
Diffstat (limited to 'dev-python/pycups')
-rw-r--r--dev-python/pycups/Manifest1
-rw-r--r--dev-python/pycups/files/pycups-2.0.1-py3.10.patch24
-rw-r--r--dev-python/pycups/pycups-2.0.1.ebuild34
3 files changed, 59 insertions, 0 deletions
diff --git a/dev-python/pycups/Manifest b/dev-python/pycups/Manifest
index e30fc7d69009..985b91aadef8 100644
--- a/dev-python/pycups/Manifest
+++ b/dev-python/pycups/Manifest
@@ -1 +1,2 @@
DIST pycups-1.9.73.tar.bz2 52732 BLAKE2B a6c9750970548ba85cdef4041f716491e9b0cf4273cb5381bca8e57deab457affaa62eccf74d36eb3f8b047e5142c952e56e7e624f85ed7959a769f568824f26 SHA512 ee893d64f1645b71805ac358c4a3cc594f6285f04272ff0558aa60cbc90fafdbac30b623ffcc3a6b739218d9fd7a6a6e1d8cb186a5582f2cc30a518ed4dde810
+DIST pycups-2.0.1.tar.gz 62968 BLAKE2B c9d955b89f2e9746827721c875dfc97538bb4575ee3f78c41a94f06b361cd3d22c14d453bfbea210160026d33c6e161b1d14c4dffeaddd644c260779f56e1db7 SHA512 fdebf1cac8cc4fffb8a76a938aa91965dae4a3dcdb6d8ee26e8e6054809d26dd3fb20b10c2351fb9265c03b16d6bde011815111c452ccb058518372f22d9d617
diff --git a/dev-python/pycups/files/pycups-2.0.1-py3.10.patch b/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
new file mode 100644
index 000000000000..557b485fbafe
--- /dev/null
+++ b/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
@@ -0,0 +1,24 @@
+From 8cbf6d40a0132764ad51e7416aa7034966875091 Mon Sep 17 00:00:00 2001
+From: Zdenek Dohnal <zdohnal@redhat.com>
+Date: Mon, 28 Jun 2021 13:17:45 +0200
+Subject: [PATCH] cupsipp.h: define PY_SSIZE_T_CLEAN
+
+Fixes traceback during IPPRequest.writeIO with Python 3.10
+---
+ NEWS | 2 ++
+ cupsipp.h | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/cupsipp.h b/cupsipp.h
+index 2a15ce6..b890198 100644
+--- a/cupsipp.h
++++ b/cupsipp.h
+@@ -21,6 +21,8 @@
+ #ifndef HAVE_CUPSIPP_H
+ #define HAVE_CUPSIPP_H
+
++#define PY_SSIZE_T_CLEAN
++
+ #include <Python.h>
+ #include <cups/ipp.h>
+
diff --git a/dev-python/pycups/pycups-2.0.1.ebuild b/dev-python/pycups/pycups-2.0.1.ebuild
new file mode 100644
index 000000000000..b14f8c18b45c
--- /dev/null
+++ b/dev-python/pycups/pycups-2.0.1.ebuild
@@ -0,0 +1,34 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+DISTUTILS_USE_SETUPTOOLS=no
+inherit distutils-r1
+
+DESCRIPTION="Python bindings for the CUPS API"
+HOMEPAGE="https://github.com/OpenPrinting/pycups"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+SLOT="0"
+IUSE="examples"
+
+RDEPEND="net-print/cups"
+DEPEND="${RDEPEND}"
+
+python_install_all() {
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}/examples
+ fi
+ distutils-r1_python_install_all
+}
+
+PATCHES=(
+ # https://github.com/OpenPrinting/pycups/commit/8cbf6d40a0132764ad51e7416aa7034966875091
+ "${FILESDIR}/${P}-py3.10.patch"
+)