Christian Hesse pushed to branch main at Arch Linux / Packaging / Packages / python-pyscard
Commits: 84d965f0 by Christian Hesse at 2023-12-22T13:36:42+01:00 apply: Remove use of imp module for wx (GUI) ... to prepare for python 3.12... https://archlinux.org/todo/imp-module-removal-in-python-312/ - - - - - 3 changed files: - .SRCINFO - + 0001-Remove-use-of-imp-module-for-wx-GUI.patch - PKGBUILD Changes: ===================================== .SRCINFO ===================================== @@ -11,9 +11,11 @@ pkgbase = python-pyscard depends = pcsclite source = https://downloads.sourceforge.net/project/pyscard/pyscard/pyscard%202.0.7/pyscard-2.0.7.tar.gz source = https://downloads.sourceforge.net/project/pyscard/pyscard/pyscard%202.0.7/pyscard-2.0.7.tar.gz.asc + source = 0001-Remove-use-of-imp-module-for-wx-GUI.patch validpgpkeys = 535E3696356979F4932CB7443F4A8A8FE07F1CF9 validpgpkeys = F5E11B9FFE911146F41D953D78A1B4DFE8F9C57E sha256sums = 278054525fa75fbe8b10460d87edcd03a70ad94d688b11345e4739987f85c1bf sha256sums = SKIP + sha256sums = 73530f38031f6d669cf1dce44ab5c0801eeecfd65514f8a71873bda75daa4a21 pkgname = python-pyscard ===================================== 0001-Remove-use-of-imp-module-for-wx-GUI.patch ===================================== @@ -0,0 +1,38 @@ +From 5a42e2e3be862d82fa3804eebf2e0d90756b7fcc Mon Sep 17 00:00:00 2001 +From: Ludovic Rousseau <[email protected]> +Date: Fri, 22 Dec 2023 12:56:00 +0100 +Subject: [PATCH 1/1] Remove use of imp module for wx (GUI) + +The module "imp" has been removed in Python 3.12 +https://docs.python.org/dev/whatsnew/3.12.html#imp + +Thanks to Christian Hesse for the bug report +Closes: https://github.com/LudovicRousseau/pyscard/issues/161 +--- + smartcard/wx/__init__.py | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/smartcard/wx/__init__.py b/smartcard/wx/__init__.py +index 3ecde07..5c57f46 100644 +--- a/smartcard/wx/__init__.py ++++ b/smartcard/wx/__init__.py +@@ -22,15 +22,13 @@ along with pyscard; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + """ + +-import imp + import os.path + import sys + + + def main_is_frozen(): + return(hasattr(sys, "frozen") or \ +- hasattr(sys, "importers") or \ +- imp.is_frozen("__main__")) ++ hasattr(sys, "importers")) + + + ICO_SMARTCARD = None +-- +2.43.0 + ===================================== PKGBUILD ===================================== @@ -13,9 +13,17 @@ depends=('python' 'pcsclite') makedepends=('swig' 'python-setuptools') validpgpkeys=('535E3696356979F4932CB7443F4A8A8FE07F1CF9' # Ludovic Rousseau <[email protected]> 'F5E11B9FFE911146F41D953D78A1B4DFE8F9C57E') # Ludovic Rousseau <[email protected]> -source=("https://downloads.sourceforge.net/project/pyscard/pyscard/pyscard%20${pkgver}/pyscard-${pkgver}.tar.gz"{,.asc}) +source=("https://downloads.sourceforge.net/project/pyscard/pyscard/pyscard%20${pkgver}/pyscard-${pkgver}.tar.gz"{,.asc} + '0001-Remove-use-of-imp-module-for-wx-GUI.patch') sha256sums=('278054525fa75fbe8b10460d87edcd03a70ad94d688b11345e4739987f85c1bf' - 'SKIP') + 'SKIP' + '73530f38031f6d669cf1dce44ab5c0801eeecfd65514f8a71873bda75daa4a21') + +prepare() { + cd "${srcdir}/${_pyname}-${pkgver}/" + + patch -Np1 < ../0001-Remove-use-of-imp-module-for-wx-GUI.patch +} package() { cd "${srcdir}/${_pyname}-${pkgver}/" View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyscard/-/commit/84d965f0c94716cab7b20523168fe6e29d84b332 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pyscard/-/commit/84d965f0c94716cab7b20523168fe6e29d84b332 You're receiving this email because of your account on gitlab.archlinux.org.
