Gentoo Archives: gentoo-commits

From: Louis Sautier <sbraz@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pycups/files/, dev-python/pycups/
Date: Sun, 22 Aug 2021 12:34:12
Message-Id: 1629635640.2c6c69aec374e07d1089d276bce3f78b4b033003.sbraz@gentoo
1 commit: 2c6c69aec374e07d1089d276bce3f78b4b033003
2 Author: Louis Sautier <sbraz <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 22 11:52:10 2021 +0000
4 Commit: Louis Sautier <sbraz <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 22 12:34:00 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c6c69ae
7
8 dev-python/pycups: add 2.0.1, enable py3.10, update HOMEPAGE
9
10 Signed-off-by: Louis Sautier <sbraz <AT> gentoo.org>
11
12 dev-python/pycups/Manifest | 1 +
13 dev-python/pycups/files/pycups-2.0.1-py3.10.patch | 24 ++++++++++++++++
14 dev-python/pycups/pycups-2.0.1.ebuild | 34 +++++++++++++++++++++++
15 3 files changed, 59 insertions(+)
16
17 diff --git a/dev-python/pycups/Manifest b/dev-python/pycups/Manifest
18 index e30fc7d6900..985b91aadef 100644
19 --- a/dev-python/pycups/Manifest
20 +++ b/dev-python/pycups/Manifest
21 @@ -1 +1,2 @@
22 DIST pycups-1.9.73.tar.bz2 52732 BLAKE2B a6c9750970548ba85cdef4041f716491e9b0cf4273cb5381bca8e57deab457affaa62eccf74d36eb3f8b047e5142c952e56e7e624f85ed7959a769f568824f26 SHA512 ee893d64f1645b71805ac358c4a3cc594f6285f04272ff0558aa60cbc90fafdbac30b623ffcc3a6b739218d9fd7a6a6e1d8cb186a5582f2cc30a518ed4dde810
23 +DIST pycups-2.0.1.tar.gz 62968 BLAKE2B c9d955b89f2e9746827721c875dfc97538bb4575ee3f78c41a94f06b361cd3d22c14d453bfbea210160026d33c6e161b1d14c4dffeaddd644c260779f56e1db7 SHA512 fdebf1cac8cc4fffb8a76a938aa91965dae4a3dcdb6d8ee26e8e6054809d26dd3fb20b10c2351fb9265c03b16d6bde011815111c452ccb058518372f22d9d617
24
25 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
26 new file mode 100644
27 index 00000000000..557b485fbaf
28 --- /dev/null
29 +++ b/dev-python/pycups/files/pycups-2.0.1-py3.10.patch
30 @@ -0,0 +1,24 @@
31 +From 8cbf6d40a0132764ad51e7416aa7034966875091 Mon Sep 17 00:00:00 2001
32 +From: Zdenek Dohnal <zdohnal@××××××.com>
33 +Date: Mon, 28 Jun 2021 13:17:45 +0200
34 +Subject: [PATCH] cupsipp.h: define PY_SSIZE_T_CLEAN
35 +
36 +Fixes traceback during IPPRequest.writeIO with Python 3.10
37 +---
38 + NEWS | 2 ++
39 + cupsipp.h | 2 ++
40 + 2 files changed, 4 insertions(+)
41 +
42 +diff --git a/cupsipp.h b/cupsipp.h
43 +index 2a15ce6..b890198 100644
44 +--- a/cupsipp.h
45 ++++ b/cupsipp.h
46 +@@ -21,6 +21,8 @@
47 + #ifndef HAVE_CUPSIPP_H
48 + #define HAVE_CUPSIPP_H
49 +
50 ++#define PY_SSIZE_T_CLEAN
51 ++
52 + #include <Python.h>
53 + #include <cups/ipp.h>
54 +
55
56 diff --git a/dev-python/pycups/pycups-2.0.1.ebuild b/dev-python/pycups/pycups-2.0.1.ebuild
57 new file mode 100644
58 index 00000000000..b14f8c18b45
59 --- /dev/null
60 +++ b/dev-python/pycups/pycups-2.0.1.ebuild
61 @@ -0,0 +1,34 @@
62 +# Copyright 1999-2021 Gentoo Authors
63 +# Distributed under the terms of the GNU General Public License v2
64 +
65 +EAPI=8
66 +
67 +PYTHON_COMPAT=( python3_{8..10} )
68 +
69 +DISTUTILS_USE_SETUPTOOLS=no
70 +inherit distutils-r1
71 +
72 +DESCRIPTION="Python bindings for the CUPS API"
73 +HOMEPAGE="https://github.com/OpenPrinting/pycups"
74 +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
75 +
76 +LICENSE="GPL-2"
77 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
78 +SLOT="0"
79 +IUSE="examples"
80 +
81 +RDEPEND="net-print/cups"
82 +DEPEND="${RDEPEND}"
83 +
84 +python_install_all() {
85 + if use examples; then
86 + dodoc -r examples
87 + docompress -x /usr/share/doc/${PF}/examples
88 + fi
89 + distutils-r1_python_install_all
90 +}
91 +
92 +PATCHES=(
93 + # https://github.com/OpenPrinting/pycups/commit/8cbf6d40a0132764ad51e7416aa7034966875091
94 + "${FILESDIR}/${P}-py3.10.patch"
95 +)