David Runge pushed to branch main at Arch Linux / Packaging / Packages / python-pysmt
Commits: 36662bee by David Runge at 2024-03-01T15:27:40+01:00 Add backport of upstream patch for removing use of imp module The imp module is removed with Python 3.12. Signed-off-by: David Runge <[email protected]> - - - - - 13afc6b6 by David Runge at 2024-03-01T15:28:35+01:00 Switch to correct SPDX license identifier for project Signed-off-by: David Runge <[email protected]> - - - - - 8ac11ee6 by David Runge at 2024-03-01T15:31:30+01:00 upgpkg: 0.9.5-3 Rebuild to apply patch for Python 3.12 compat and switching to correct SPDX license identifier. - - - - - 3 changed files: - + .SRCINFO - PKGBUILD - + python-pysmt-0.9.5-python_312_support.patch Changes: ===================================== .SRCINFO ===================================== @@ -0,0 +1,22 @@ +pkgbase = python-pysmt + pkgdesc = Solver-agnostic library for SMT Formulae manipulation and solving + pkgver = 0.9.5 + pkgrel = 3 + url = https://github.com/pysmt/pysmt + arch = any + license = Apache-2.0 + checkdepends = python-pytest + makedepends = python-build + makedepends = python-installer + makedepends = python-wheel + makedepends = python-setuptools + depends = python + depends = python-z3-solver + source = https://github.com/pysmt/pysmt/archive/v0.9.5/python-pysmt-0.9.5.tar.gz + source = python-pysmt-0.9.5-python_312_support.patch + sha512sums = d1e3b4f9f7bc90c15ddcfbcf87e4d487acff9613ae48d56a91bd83ab1c929af8c15ced29f6b097a599f91b41bbfadcf89e4601edba2bdff36c80c41b7c5165bb + sha512sums = 24c873a099e784aaaf2cca2af3d0641a3f19269d63df1ecfa25e85ceccf17127523b39834fd64a594a9ee119d1315a154227c95711342484519d3236bed72d4b + b2sums = 0716c6b5e66a50072947f2e959ab5dfd92494b4d9bb92a11cf6250e9b8a9940591a64af0382e173230da31fd7d7178904da9bd4d424ab53ee217ccc49186234a + b2sums = d49106096f08cf4139f987f7eac9cae3b1b7696513724eb05ab7995c3d3fa66e561fa9a72fc6977d60e10b2f97f3ce9523dabb9f76fcf0516690e64b1e28d6d4 + +pkgname = python-pysmt ===================================== PKGBUILD ===================================== @@ -3,17 +3,27 @@ _pyname=pysmt pkgname=python-${_pyname} pkgver=0.9.5 -pkgrel=2 +pkgrel=3 pkgdesc='Solver-agnostic library for SMT Formulae manipulation and solving' url='https://github.com/pysmt/pysmt' -license=('Apache') +license=('Apache-2.0') arch=('any') depends=('python' 'python-z3-solver') makedepends=('python-build' 'python-installer' 'python-wheel' 'python-setuptools') checkdepends=('python-pytest') -source=("${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz") -sha512sums=('d1e3b4f9f7bc90c15ddcfbcf87e4d487acff9613ae48d56a91bd83ab1c929af8c15ced29f6b097a599f91b41bbfadcf89e4601edba2bdff36c80c41b7c5165bb') -b2sums=('0716c6b5e66a50072947f2e959ab5dfd92494b4d9bb92a11cf6250e9b8a9940591a64af0382e173230da31fd7d7178904da9bd4d424ab53ee217ccc49186234a') +source=( + "${url}/archive/v${pkgver}/${pkgname}-${pkgver}.tar.gz" + $pkgname-0.9.5-python_312_support.patch +) +sha512sums=('d1e3b4f9f7bc90c15ddcfbcf87e4d487acff9613ae48d56a91bd83ab1c929af8c15ced29f6b097a599f91b41bbfadcf89e4601edba2bdff36c80c41b7c5165bb' + '24c873a099e784aaaf2cca2af3d0641a3f19269d63df1ecfa25e85ceccf17127523b39834fd64a594a9ee119d1315a154227c95711342484519d3236bed72d4b') +b2sums=('0716c6b5e66a50072947f2e959ab5dfd92494b4d9bb92a11cf6250e9b8a9940591a64af0382e173230da31fd7d7178904da9bd4d424ab53ee217ccc49186234a' + 'd49106096f08cf4139f987f7eac9cae3b1b7696513724eb05ab7995c3d3fa66e561fa9a72fc6977d60e10b2f97f3ce9523dabb9f76fcf0516690e64b1e28d6d4') + +prepare() { + # backport of: https://github.com/pysmt/pysmt/pull/770 + patch -Np1 -d $_pyname-$pkgver -i ../$pkgname-0.9.5-python_312_support.patch +} build() { cd ${_pyname}-${pkgver} ===================================== python-pysmt-0.9.5-python_312_support.patch ===================================== @@ -0,0 +1,27 @@ +diff -ruN a/pysmt/smtlib/parser/__init__.py b/pysmt/smtlib/parser/__init__.py +--- a/pysmt/smtlib/parser/__init__.py 2022-05-28 14:12:12.000000000 +0200 ++++ b/pysmt/smtlib/parser/__init__.py 2024-03-01 15:24:10.084613742 +0100 +@@ -80,7 +80,8 @@ + # no ambiguity when importing the parser: the only way to load the + # cython version is by the so_path that targets .pyxbld . + # +- import imp ++ import importlib ++ import sys + + pyx = pyximport.install() + pyximport.uninstall(*pyx) +@@ -90,7 +91,12 @@ + + so_path = pyximport.build_module(name, path, + pyxbuild_dir=build_dir) +- mod = imp.load_dynamic(name, so_path) ++ spec = importlib.util.spec_from_file_location(name, so_path) ++ module = importlib.util.module_from_spec(spec) ++ sys.modules[name] = module ++ spec.loader.exec_module(module) ++ mod = sys.modules[name] ++ + assert mod.__file__ == so_path, (mod.__file__, so_path) + # print(so_path) + from pysmt.smtlib.parser.parser import * View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pysmt/-/compare/3b42668c8e02d803dabd8c7cf27febb6b6900b85...8ac11ee60bb1c5cfa23e7ca86daaff89e8b40050 -- View it on GitLab: https://gitlab.archlinux.org/archlinux/packaging/packages/python-pysmt/-/compare/3b42668c8e02d803dabd8c7cf27febb6b6900b85...8ac11ee60bb1c5cfa23e7ca86daaff89e8b40050 You're receiving this email because of your account on gitlab.archlinux.org.
