public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-asyncpg] f44: Avoid the dependency on pkg_resources
Date: Wed, 07 Oct 2026 10:03:24 GMT	[thread overview]
Message-ID: <179136740451.1.8442249484577973947.rpms-python-asyncpg-c001c2c846e1@fedoraproject.org> (raw)

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

                 reply	other threads:[~2026-10-07 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179136740451.1.8442249484577973947.rpms-python-asyncpg-c001c2c846e1@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox