public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-asyncpg] f44: Avoid the dependency on pkg_resources
@ 2026-10-07 10:03 Benjamin A. Beasley
0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-10-07 10:03 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-asyncpg
Branch : f44
Commit : c001c2c846e13337b44c87cbb19cceba3189b59a
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date : 2026-03-26T23:11:21+00:00
Stats : +53/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-asyncpg/c/c001c2c846e13337b44c87cbb19cceba3189b59a?branch=f44
Log:
Avoid the dependency on pkg_resources
---
diff --git a/1314.patch b/1314.patch
new file mode 100644
index 0000000..0cd62cb
--- /dev/null
+++ b/1314.patch
@@ -0,0 +1,46 @@
+From 969376ff0064d1b403fc884414ca414a3519d366 Mon Sep 17 00:00:00 2001
+From: "Benjamin A. Beasley" <code@musicinmybrain.net>
+Date: Thu, 26 Mar 2026 22:53:15 +0000
+Subject: [PATCH] Drop the Cython version check from setup.py
+
+This avoids the dependency on the pkg_resources module, which has long
+been deprecated and is no longer shipped with current versions of
+setuptools.
+---
+ setup.py | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index f9fafadf..d9f3a2d8 100644
+--- a/setup.py
++++ b/setup.py
+@@ -188,28 +188,17 @@ def finalize_options(self):
+ need_cythonize = True
+
+ if need_cythonize:
+- import pkg_resources
+-
+ # Double check Cython presence in case setup_requires
+ # didn't go into effect (most likely because someone
+ # imported Cython before setup_requires injected the
+ # correct egg into sys.path.
+ try:
+- import Cython
++ from Cython.Build import cythonize
+ except ImportError:
+ raise RuntimeError(
+ 'please install {} to compile asyncpg from source'.format(
+ CYTHON_DEPENDENCY))
+
+- cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY)
+- if Cython.__version__ not in cython_dep:
+- raise RuntimeError(
+- 'asyncpg requires {}, got Cython=={}'.format(
+- CYTHON_DEPENDENCY, Cython.__version__
+- ))
+-
+- from Cython.Build import cythonize
+-
+ directives = {
+ 'language_level': '3',
+ 'freethreading_compatible': 'True',
diff --git a/python-asyncpg.spec b/python-asyncpg.spec
index 9ab9b04..779be03 100644
--- a/python-asyncpg.spec
+++ b/python-asyncpg.spec
@@ -19,6 +19,13 @@ License: Apache-2.0 AND 0BSD AND PSF-2.0
URL: https://github.com/MagicStack/asyncpg
Source: %{pypi_source asyncpg}
+# Drop the Cython version check from setup.py
+# https://github.com/MagicStack/asyncpg/pull/1314
+#
+# This removes a dependency on pkg_resources, which is removed from setuptools
+# 82+; see https://fedoraproject.org/wiki/Changes/Setuptools_82+.
+Patch: %{url}/pull/1314.patch
+
BuildSystem: pyproject
BuildOption(install): -l asyncpg
BuildOption(generate_buildrequires): -x gssauth -g test
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-07 10:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-07 10:03 [rpms/python-asyncpg] f44: Avoid the dependency on pkg_resources Benjamin A. Beasley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox