[PATCH 0/3] Fix python-requests-kerberos build

  • Done
  • quality assurance status badge
Details
2 participants
  • Sharlatan Hellseher
  • Troy Figiel
Owner
unassigned
Submitted by
Troy Figiel
Severity
normal

Debbugs page

Troy Figiel wrote 1 years ago
(address . guix-patches@gnu.org)
87wmsd2jcn.fsf@troyfigiel.com
This patch series fixes the broken python-requests-kerberos build and enables tests along the way.

Troy Figiel (3):
gnu: Add python-krb5.
gnu: python-requests-kerberos: Fix build.
gnu: python-requests-kerberos: Enable tests.

gnu/packages/python-web.scm | 34 ++++++++++++++++++++++++++--------
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
2 files changed, 45 insertions(+), 8 deletions(-)


base-commit: 31e736dac29e6f0ff8a2de3f28e210a68684ad21
--
2.42.0
Troy Figiel wrote 1 years ago
[PATCH 1/3] gnu: Add python-krb5.
(address . 68431@debbugs.gnu.org)
87v87x2jaj.fsf@troyfigiel.com
* gnu/packages/python-xyz.scm (python-krb5): New variable.
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 37d7dd0dd5..41b7bdabcf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19500,6 +19500,25 @@ (define-public python-inflection
underscored string.")
(license license:expat)))
+(define-public python-krb5
+ (package
+ (name "python-krb5")
+ (version "0.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "krb5" version))
+ (sha256
+ (base32 "1jivws8dsscsmyqngbc71r4qw8qmn98pqmhylz01r5dd1ljfw9bi"))))
+ (build-system pyproject-build-system)
+ (inputs (list mit-krb5))
+ (native-inputs (list python-cython python-k5test python-pytest))
+ (home-page "https://github.com/jborean93/pykrb5")
+ (synopsis "Kerberos API bindings for Python")
+ (description "This library provides Python functions that wraps the
+Kerberos 5 C API.")
+ (license license:expat)))
+
(define-public python-pylev
(package
(name "python-pylev")
--
2.42.0
Troy Figiel wrote 1 years ago
[PATCH 2/3] gnu: python-requests-kerberos: Fix build.
(address . 68431@debbugs.gnu.org)
87ttnh2j9g.fsf@troyfigiel.com
* gnu/packages/python-web.scm (python-requests-kerberos)[propagated-inputs]:
Add python-gssapi and python-krb5.
---
gnu/packages/python-web.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 567b01f396..e13716081f 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3307,8 +3307,15 @@ (define-public python-requests-kerberos
(base32
"1lbgjs779cjxhz07lfl9dbyp3qfh8a3ir2393042wfg518jd3afd"))))
(build-system python-build-system)
- (propagated-inputs (list python-cryptography python-pyspnego
- python-requests))
+ (propagated-inputs (list python-cryptography
+ python-pyspnego
+ python-requests
+
+ ;; Required through pyspnego[kerberos]. Only
+ ;; `python-krb5' is directly used in the source
+ ;; code though.
+ python-gssapi
+ python-krb5))
(home-page "https://github.com/requests/requests-kerberos")
(synopsis "Kerberos authentication handler for python-requests")
(description "This package provides a Kerberos authentication handler for
--
2.42.0
Troy Figiel wrote 1 years ago
[PATCH 3/3] gnu: python-requests-kerberos: Enable tests.
(address . 68431@debbugs.gnu.org)
87sf312j86.fsf@troyfigiel.com
* gnu/packages/python-web.scm (python-requests-kerberos): Enable tests.
[source]: Replace the PyPI release by the Github release.
[arguments]<#:phases>: Replace the default check phase with a pytest
invocation.
[native-inputs]: Add python-pytest and python-pytest-mock.
---
gnu/packages/python-web.scm | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index e13716081f..7b25bee15a 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -3300,13 +3300,23 @@ (define-public python-requests-kerberos
(package
(name "python-requests-kerberos")
(version "0.14.0")
- (source (origin
- (method url-fetch)
- (uri (pypi-uri "requests-kerberos" version))
- (sha256
- (base32
- "1lbgjs779cjxhz07lfl9dbyp3qfh8a3ir2393042wfg518jd3afd"))))
+ ;; No tests in the PyPI tarball.
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/requests/requests-kerberos")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0s30pcnlir3j2jmf7yh065f294cf3x0x5i3ldskn8mm0a3657mv3"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
(propagated-inputs (list python-cryptography
python-pyspnego
python-requests
@@ -3316,6 +3326,7 @@ (define-public python-requests-kerberos
;; code though.
python-gssapi
python-krb5))
+ (native-inputs (list python-pytest python-pytest-mock))
(home-page "https://github.com/requests/requests-kerberos")
(synopsis "Kerberos authentication handler for python-requests")
(description "This package provides a Kerberos authentication handler for
--
2.42.0
Troy Figiel wrote 1 years ago
Typo
(address . 68431@debbugs.gnu.org)
87ply52ij2.fsf@troyfigiel.com
There is a small typo in the description of python-krb5: sed
's/wraps/wrap/'. I see the typo comes from the upstream README.

Best wishes,

Troy
Sharlatan Hellseher wrote 1 years ago
(address . 68431-done@debbugs.gnu.org)(address . troy@troyfigiel.com)
CAO+9K5r3E2pmKDkV-r1Oi=xojUdPbN=xYZYLMaHBSvU2JjvK5A@mail.gmail.com
Hi,
Thank you for your work.
I've slightly adjusted them and pushed as
19db1551dc6f6180d2cda9084c2dec37bf4923c9.
- 1/3 gnu: Add python-krb5.
It was applied without modifications.
- 2/3 gnu: python-requests-kerberos: Fix build.
I've included only python-gssapi, and added python-krb5 as propagated input in
python-pyspnego.
- 3/3 gnu: python-requests-kerberos: Enable tests.
I've used pyproject-build-system, which does not require modifying 'check
phase.
Thanks,
Oleg
--
VCS: https://github.incerto.xyz/;https://git.sr.ht/~hellseher/
GPG: 9847 81DE 689C 21C2 6418 0867 76D7 27BF F62C D2B5
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 68431@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68431
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help