[arch-commits] Commit in python-colorclass/trunk (PKGBUILD python310.patch)

Evangelos Foutras foutrelis at gemini.archlinux.org
Fri Dec 3 17:51:39 UTC 2021


    Date: Friday, December 3, 2021 @ 17:51:39
  Author: foutrelis
Revision: 1064847

Fix build with Python 3.10

Added:
  python-colorclass/trunk/python310.patch
Modified:
  python-colorclass/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   11 +++++++++--
 python310.patch |   12 ++++++++++++
 2 files changed, 21 insertions(+), 2 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-12-03 17:49:21 UTC (rev 1064846)
+++ PKGBUILD	2021-12-03 17:51:39 UTC (rev 1064847)
@@ -11,9 +11,16 @@
 depends=('python')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest' 'python-docopt')
-source=(${pkgname}-${pkgver}.tar.gz::https://github.com/Robpol86/colorclass/archive/v${pkgver}.tar.gz)
-sha512sums=('c627cdf6abdb5a60e9ecc1fb3b669898edc027fdc3f8cde31be2e10402ee308c2067fcd50d1228759e93fc58c521b7fc12e6b259233a17cf99f55cda26279fed')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/Robpol86/colorclass/archive/v${pkgver}.tar.gz
+        python310.patch)
+sha512sums=('c627cdf6abdb5a60e9ecc1fb3b669898edc027fdc3f8cde31be2e10402ee308c2067fcd50d1228759e93fc58c521b7fc12e6b259233a17cf99f55cda26279fed'
+            'b8da7b0cc2b8ca942b260323d3de78549b1ed041f38e66f68b615dea7412d01719a9aa467102a2ed67deeda15eae5adc2dac62232aab374b3a5113e00e1a96a0')
 
+prepare() {
+  cd ${_pyname}-${pkgver}
+  patch -Np1 -i ../python310.patch
+}
+
 build() {
   cd ${_pyname}-${pkgver}
   python setup.py build

Added: python310.patch
===================================================================
--- python310.patch	                        (rev 0)
+++ python310.patch	2021-12-03 17:51:39 UTC (rev 1064847)
@@ -0,0 +1,12 @@
+diff -upr colorclass-2.2.0.orig/colorclass/codes.py colorclass-2.2.0/colorclass/codes.py
+--- colorclass-2.2.0.orig/colorclass/codes.py	2016-05-15 04:40:12.000000000 +0300
++++ colorclass-2.2.0/colorclass/codes.py	2021-12-03 19:50:41.905866298 +0200
+@@ -1,7 +1,7 @@
+ """Handles mapping between color names and ANSI codes and determining auto color codes."""
+ 
+ import sys
+-from collections import Mapping
++from collections.abc import Mapping
+ 
+ BASE_CODES = {
+     '/all': 0, 'b': 1, 'f': 2, 'i': 3, 'u': 4, 'flash': 5, 'outline': 6, 'negative': 7, 'invis': 8, 'strike': 9,



More information about the arch-commits mailing list