unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Kyle Meyer <kyle@kyleam.com>
To: 46866@debbugs.gnu.org
Subject: [bug#46866] [PATCH] gnu: b4: Fix setup.py version incompatibility.
Date: Mon,  1 Mar 2021 20:51:58 -0500	[thread overview]
Message-ID: <20210302015158.16177-1-kyle@kyleam.com> (raw)

Following the update of python-requests to 2.25.0, b4 fails at runtime with a
pkg_resources.ContextualVersionConflict exception.  This has been addressed
upstream.  Temporarily apply the upstream fix.

* gnu/packages/patches/b4-loosen-version-identifiers.patch: New patch.
* gnu/packages/version-control.scm (b4): Apply it.
---
 .../b4-loosen-version-identifiers.patch       | 44 +++++++++++++++++++
 gnu/packages/version-control.scm              |  3 +-
 2 files changed, 46 insertions(+), 1 deletion(-)
 create mode 100644 gnu/packages/patches/b4-loosen-version-identifiers.patch

diff --git a/gnu/packages/patches/b4-loosen-version-identifiers.patch b/gnu/packages/patches/b4-loosen-version-identifiers.patch
new file mode 100644
index 0000000000..5ae5865274
--- /dev/null
+++ b/gnu/packages/patches/b4-loosen-version-identifiers.patch
@@ -0,0 +1,44 @@
+From e66d514b4113fffc81e48c7c531dcf148ba8b8e8 Mon Sep 17 00:00:00 2001
+From: Kyle Meyer <kyle@kyleam.com>
+Date: Thu, 25 Feb 2021 23:25:57 -0500
+Subject: Loosen compatible release identifiers for install_requires
+
+The install_requires entries use a compatible release operator.  As an
+example, "requests~=2.24.0" maps to a requirement of ">= 2.24.0 and ==
+2.24.*".  With the current version of requests (2.25.1), this leads to
+a ContextualVersionConflict failure at runtime.
+
+Allowing only Z to tick in version X.Y.Z seems unnecessarily strict
+unless there are known problems with a particular release, and it
+makes it more difficult for distributions to package b4.  Drop the
+trailing digit from all of the version identifiers, allowing both Y
+and Z to increase.
+
+Signed-off-by: Kyle Meyer <kyle@kyleam.com>
+Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
+---
+  This patch was taken from the upstream repository and will be included in
+  the next release.
+
+  https://git.kernel.org/pub/scm/utils/b4/b4.git/patch/?id=e66d514b4113fffc81e48c7c531dcf148ba8b8e8
+
+ setup.py | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 358e6a7..a21ec76 100644
+--- a/setup.py
++++ b/setup.py
+@@ -41,9 +41,9 @@ setup(
+     data_files = [('share/man/man5', ['man/b4.5'])],
+     keywords=['git', 'lore.kernel.org', 'patches'],
+     install_requires=[
+-        'requests~=2.24.0',
+-        'dkimpy~=1.0.5',
+-        'dnspython~=2.0.0',
++        'requests~=2.24',
++        'dkimpy~=1.0',
++        'dnspython~=2.0',
+     ],
+     python_requires='>=3.6',
+     entry_points={
diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 3afb06ca79..2fb8fa821f 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -2347,7 +2347,8 @@ (define-public b4
        (method url-fetch)
        (uri (pypi-uri "b4" version))
        (sha256
-        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))))
+        (base32 "1j904dy9cwxl85k2ngc498q5cdnqwsmw3jibjr1m55w8aqdck68z"))
+       (patches (search-patches "b4-loosen-version-identifiers.patch"))))
     (build-system python-build-system)
     (arguments '(#:tests? #f))          ; No tests.
     (inputs

base-commit: 4bc9a1f4e3bd39302b4ceaab8589a2e6ef82c4bd
-- 
2.31.0.rc0.254.gbdcc3b1a9d





             reply	other threads:[~2021-03-02  1:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02  1:51 Kyle Meyer [this message]
2021-03-09  8:09 ` [bug#46866] [PATCH] gnu: b4: Fix setup.py version incompatibility Efraim Flashner
2021-03-09 22:54   ` Kyle Meyer
2021-03-16 12:29     ` bug#46866: " Efraim Flashner

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20210302015158.16177-1-kyle@kyleam.com \
    --to=kyle@kyleam.com \
    --cc=46866@debbugs.gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).