public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Carl George <carl@george.computer>
To: git-commits@fedoraproject.org
Subject: [rpms/python-docker] epel10.2: Rewrite patch2 to conditionally apply extra dependencies
Date: Tue, 13 Oct 2026 18:25:52 GMT	[thread overview]
Message-ID: <179191595246.1.3308574953487852235.rpms-python-docker-769227bb23b1@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-docker
Branch : epel10.2
Commit : 769227bb23b18a3f1c34b2c8a81230b522efdd11
Author : Carl George <carl@george.computer>
Date   : 2017-09-05T12:07:45-05:00
Stats  : +52/-28 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/python-docker/c/769227bb23b18a3f1c34b2c8a81230b522efdd11?branch=epel10.2

Log:
Rewrite patch2 to conditionally apply extra dependencies

---
diff --git a/python-docker.spec b/python-docker.spec
index 866845c..3c0605b 100644
--- a/python-docker.spec
+++ b/python-docker.spec
@@ -25,8 +25,11 @@ Source0:        https://files.pythonhosted.org/packages/source/d/%{srcname}/%{sr
 # we have those in Fedora in different versions
 Patch1:         unpin-test-requirements.patch
 
-# Python packages mentioned in `extras_require` are not available in CentOS
-Patch2:         setup-Neuter-extras_require-that-doesn-t-work-on-Cen.patch
+# Upstream uses environment markers to conditionally apply some dependencies.
+# Environment markers were first added in setuptools 20.6.8, so that doesn't
+# work in RHEL.  This patch converts those environment markers into simple if
+# statements.
+Patch2:         remove-environment-markers.patch
 
 # Upstream uses pip to check if the older docker-py module is installed.  We
 # handle that with an obsolete.
@@ -155,6 +158,7 @@ PYTHONPATH="${PWD}" py.test-%{python3_version} tests/unit/ || :
 %changelog
 * Tue Sep 05 2017 Carl George <carl@george.computer> - 2.5.1-2
 - Add patch3 to remove pip dependency
+- Rewrite patch2 to conditionally apply extra dependencies
 
 * Wed Aug 23 2017 Tomas Tomecek <ttomecek@redhat.com> - 2.5.1-1
 - new upstream release: 2.5.1

diff --git a/remove-environment-markers.patch b/remove-environment-markers.patch
new file mode 100644
index 0000000..90db013
--- /dev/null
+++ b/remove-environment-markers.patch
@@ -0,0 +1,46 @@
+Generate requirements list dynamically instead of using environment markers.
+This allows using versions of setuptools older than 20.6.8.
+
+diff -Nurp docker-2.5.1.orig/setup.py docker-2.5.1/setup.py
+--- docker-2.5.1.orig/setup.py	2017-08-22 18:44:35.000000000 -0500
++++ docker-2.5.1/setup.py	2017-09-05 12:06:03.280017598 -0500
+@@ -29,23 +29,14 @@ requirements = [
+ if sys.platform == 'win32':
+     requirements.append('pypiwin32 >= 219')
+ 
+-extras_require = {
+-    ':python_version < "3.5"': 'backports.ssl_match_hostname >= 3.5',
+-    # While not imported explicitly, the ipaddress module is required for
+-    # ssl_match_hostname to verify hosts match with certificates via
+-    # ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
+-    ':python_version < "3.3"': 'ipaddress >= 1.0.16',
+-
+-    # If using docker-py over TLS, highly recommend this option is
+-    # pip-installed or pinned.
+-
+-    # TODO: if pip installing both "requests" and "requests[security]", the
+-    # extra package from the "security" option are not installed (see
+-    # https://github.com/pypa/pip/issues/4391).  Once that's fixed, instead of
+-    # installing the extra dependencies, install the following instead:
+-    # 'requests[security] >= 2.5.2, != 2.11.0, != 2.12.2'
+-    'tls': ['pyOpenSSL>=0.14', 'cryptography>=1.3.4', 'idna>=2.0.0'],
+-}
++if sys.version_info[:2] < (3, 5):
++    requirements.append('backports.ssl_match_hostname >= 3.5')
++
++# While not imported explicitly, the ipaddress module is required for
++# ssl_match_hostname to verify hosts match with certificates via
++# ServerAltname: https://pypi.python.org/pypi/backports.ssl_match_hostname
++if sys.version_info[:2] < (3, 3):
++    requirements.append('ipaddress >= 1.0.16')
+ 
+ version = None
+ exec(open('docker/version.py').read())
+@@ -72,7 +63,6 @@ setup(
+     packages=find_packages(exclude=["tests.*", "tests"]),
+     install_requires=requirements,
+     tests_require=test_requirements,
+-    extras_require=extras_require,
+     zip_safe=False,
+     test_suite='tests',
+     classifiers=[

diff --git a/setup-Neuter-extras_require-that-doesn-t-work-on-Cen.patch b/setup-Neuter-extras_require-that-doesn-t-work-on-Cen.patch
deleted file mode 100644
index 76d7c3a..0000000
--- a/setup-Neuter-extras_require-that-doesn-t-work-on-Cen.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 3eeef7b62131a1dbcbb2758eb9eb382578ddd0fb Mon Sep 17 00:00:00 2001
-From: Colin Walters <walters@verbum.org>
-Date: Tue, 3 May 2016 16:35:24 +0200
-Subject: [PATCH] setup: Neuter extras_require that doesn't work on CentOS 7
-
-I think the version of python-setuputils is too old or something.
----
- setup.py | 16 ++++++++--------
- 1 file changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/setup.py b/setup.py
-index 9fc4ad6..6167419 100644
---- a/setup.py
-+++ b/setup.py
-@@ -62,7 +62,7 @@ setup(
-     packages=find_packages(exclude=["tests.*", "tests"]),
-     install_requires=requirements,
-     tests_require=test_requirements,
--    extras_require=extras_require,
-+    # extras_require=extras_require,
-     zip_safe=False,
-     test_suite='tests',
-     classifiers=[
--- 
-2.11.0
-

                 reply	other threads:[~2026-10-13 18:25 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=179191595246.1.3308574953487852235.rpms-python-docker-769227bb23b1@fedoraproject.org \
    --to=carl@george.computer \
    --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