George Rawlinson pushed to branch main at Arch Linux / Packaging / Packages / 
python-stopit


Commits:
d029f061 by loqs at 2026-03-02T20:46:28+00:00
Remove pkg_resources

- Related https://archlinux.org/todo/python-pkg_resources-deprecation/.

- - - - -


5 changed files:

- .SRCINFO
- + LICENSES/MIT.txt
- PKGBUILD
- REUSE.toml
- + python-stopit-1.1.2-remove-pkg_resources.patch


Changes:

=====================================
.SRCINFO
=====================================
@@ -7,10 +7,12 @@ pkgbase = python-stopit
        license = MIT
        makedepends = python-build
        makedepends = python-installer
+       makedepends = python-setuptools
        makedepends = python-wheel
        depends = python
-       depends = python-setuptools
        source = 
python-stopit-1.1.2.tar.gz::https://github.com/glenfant/stopit/archive/1.1.2.tar.gz
+       source = python-stopit-1.1.2-remove-pkg_resources.patch
        sha512sums = 
4b1771a357f35a82128e92d7e91fa3e788271a3d6f1e08bacee69546c7c2fa857104394d8617259235c413b7f1706ccd4ff9ed480af5e1faef1149d1c1e0a0e0
+       sha512sums = 
919a9b2de4fc3ae16f6db5e789ddc3bf9a9d369da99b88afe7414480ce0b73491158ee420c1fe6ab55e148386f03f6d37bc514f8edffd7c0efc66373250cb62d
 
 pkgname = python-stopit


=====================================
LICENSES/MIT.txt
=====================================
@@ -0,0 +1,18 @@
+MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and
+associated documentation files (the "Software"), to deal in the Software 
without restriction, including
+without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the
+following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
copies or substantial
+portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE 
AND NONINFRINGEMENT. IN NO
+EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
CONNECTION WITH THE SOFTWARE OR THE
+USE OR OTHER DEALINGS IN THE SOFTWARE.


=====================================
PKGBUILD
=====================================
@@ -8,10 +8,17 @@ pkgdesc='Library to raise asynchronous exceptions in other 
thread, control the t
 url='https://github.com/glenfant/stopit'
 arch=('any')
 license=('MIT')
-depends=('python' 'python-setuptools')
-makedepends=('python-build' 'python-installer' 'python-wheel')
-source=("${pkgname}-${pkgver}.tar.gz::https://github.com/glenfant/${_pyname}/archive/${pkgver}.tar.gz";)
-sha512sums=('4b1771a357f35a82128e92d7e91fa3e788271a3d6f1e08bacee69546c7c2fa857104394d8617259235c413b7f1706ccd4ff9ed480af5e1faef1149d1c1e0a0e0')
+depends=('python')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 
'python-wheel')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/glenfant/${_pyname}/archive/${pkgver}.tar.gz";
+        "python-stopit-1.1.2-remove-pkg_resources.patch")
+sha512sums=('4b1771a357f35a82128e92d7e91fa3e788271a3d6f1e08bacee69546c7c2fa857104394d8617259235c413b7f1706ccd4ff9ed480af5e1faef1149d1c1e0a0e0'
+            
'919a9b2de4fc3ae16f6db5e789ddc3bf9a9d369da99b88afe7414480ce0b73491158ee420c1fe6ab55e148386f03f6d37bc514f8edffd7c0efc66373250cb62d')
+
+prepare() {
+  cd ${_pyname}-${pkgver}
+  patch -Np1 -i ../python-stopit-1.1.2-remove-pkg_resources.patch
+}
 
 build() {
   cd ${_pyname}-${pkgver}


=====================================
REUSE.toml
=====================================
@@ -20,3 +20,10 @@ path = [
 ]
 SPDX-FileCopyrightText = "Arch Linux contributors"
 SPDX-License-Identifier = "0BSD"
+
+[[annotations]]
+path = [
+    "python-stopit-1.1.2-remove-pkg_resources.patch",
+]
+SPDX-FileCopyrightText = "python-stopit contributors"
+SPDX-License-Identifier = "MIT"


=====================================
python-stopit-1.1.2-remove-pkg_resources.patch
=====================================
@@ -0,0 +1,25 @@
+diff --git a/src/stopit/__init__.py b/src/stopit/__init__.py
+index 6ca0180..4bf9555 100644
+--- a/src/stopit/__init__.py
++++ b/src/stopit/__init__.py
+@@ -7,7 +7,7 @@ stopit
+ Public resources from ``stopit``
+ """
+ 
+-import pkg_resources
++from importlib.metadata import version
+ 
+ from .utils import LOG, TimeoutException
+ from .threadstop import ThreadingTimeout, async_raise, threading_timeoutable
+@@ -15,9 +15,9 @@ from .signalstop import SignalTimeout, signal_timeoutable
+ 
+ # PEP 396 style version marker
+ try:
+-    __version__ = pkg_resources.get_distribution(__name__).version
++    __version__ = version(__name__)
+ except:
+-    LOG.warning("Could not get the package version from pkg_resources")
++    LOG.warning("Could not get the package version from importlib.metadata")
+     __version__ = 'unknown'
+ 
+ __all__ = (



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-stopit/-/commit/d029f0613ae3399f93661a5c62730c1436690731

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/python-stopit/-/commit/d029f0613ae3399f93661a5c62730c1436690731
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to