1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-04-06 21:20:33 +02:00

gnu: python-msal: Update to 1.34.0.

* gnu/packages/python-web.scm (python-msal): Update to 1.34.0.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:tests?>: Run them.
<#:test-flags>: Ignoring failing tests.
<#:phases>: Add phases 'set-cryptography-version and 'configure-tests.
[native-inputs]: Add nss-certs-for-test, python-pytest,
python-setuptools.

Change-Id: I73e6ea369df191bdd0a0df670867acd527382319
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
This commit is contained in:
Nicolas Graves
2025-11-30 16:32:54 +01:00
committed by Sharlatan Hellseher
parent c8c9421c64
commit 6656a7896c
3 changed files with 76 additions and 14 deletions

View File

@@ -2049,6 +2049,7 @@ dist_patch_DATA = \
%D%/packages/patches/python-louvain-fix-test.patch \ %D%/packages/patches/python-louvain-fix-test.patch \
%D%/packages/patches/python-matplotlib-fix-legend-loc-best-test.patch \ %D%/packages/patches/python-matplotlib-fix-legend-loc-best-test.patch \
%D%/packages/patches/python-mohawk-pytest.patch \ %D%/packages/patches/python-mohawk-pytest.patch \
%D%/packages/patches/python-msal-requests.patch \
%D%/packages/patches/python-norns-nose.patch \ %D%/packages/patches/python-norns-nose.patch \
%D%/packages/patches/python-numpy-gcc-14.patch \ %D%/packages/patches/python-numpy-gcc-14.patch \
%D%/packages/patches/python-random2-getrandbits-test.patch \ %D%/packages/patches/python-random2-getrandbits-test.patch \

View File

@@ -0,0 +1,36 @@
From 74cda7c7ce34b34b1a378b5e3be02f44bbea09d6 Mon Sep 17 00:00:00 2001
Message-ID: <74cda7c7ce34b34b1a378b5e3be02f44bbea09d6.1764515163.git.ngraves@ngraves.fr>
From: Nicolas Graves <ngraves@ngraves.fr>
Date: Sun, 30 Nov 2025 16:05:39 +0100
Subject: [PATCH] Replace requests.get by a placeholder
---
tests/test_cryptography.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/tests/test_cryptography.py b/tests/test_cryptography.py
index b119e59..8948ab0 100644
--- a/tests/test_cryptography.py
+++ b/tests/test_cryptography.py
@@ -3,7 +3,6 @@ import os
import re
from unittest import TestCase
import warnings
-import xml.etree.ElementTree as ET
import requests
@@ -11,9 +10,7 @@ from msal.application import (
_str2bytes, _load_private_key_from_pem_str, _parse_pfx)
-latest_cryptography_version = ET.fromstring(
- requests.get("https://pypi.org/rss/project/cryptography/releases.xml").text
- ).findall("./channel/item/title")[0].text
+latest_cryptography_version = @version@
def get_current_ceiling():
--
2.51.2

View File

@@ -6761,23 +6761,48 @@ authorization scheme.")
(define-public python-msal (define-public python-msal
(package (package
(name "python-msal") (name "python-msal")
(version "1.31.1") (version "1.34.0")
(home-page (home-page
"https://github.com/AzureAD/microsoft-authentication-library-for-python") "https://github.com/AzureAD/microsoft-authentication-library-for-python")
(source (origin (source
(method git-fetch) (origin
;; Pypi does not have tests. (method git-fetch)
(uri (git-reference (url home-page) (commit version))) (uri (git-reference
(file-name (git-file-name name version)) (url home-page)
(sha256 (commit version)))
(base32 (file-name (git-file-name name version))
"18dg1j2az5ywk6klfd3kp36fxa4cmmf9yvma4li0a2nz2jgc1gdd")))) (sha256
(build-system python-build-system) (base32 "1xcyiv742ihnzypjw7syamnhqffdy6wsvvv0f5jcl3pap0apbk0z"))
(patches (search-patches "python-msal-requests.patch"))))
(build-system pyproject-build-system)
(arguments (arguments
;; Tests (all?) rely on network access and only some can be disabled by (list
;; setting the environment variable TRAVIS_TAG. #:test-flags
(list #:tests? #f)) #~(list
(native-inputs (list python-mock)) "--ignore=tests/test_benchmark.py"
;; XXX: Ignoring cryptography version scheme tests.
"-k"
"not test_ceiling_should_be_latest_cryptography_version_plus_three"
;; XXX: These tests try to access the network.
"--ignore=tests/test_application.py"
"--ignore=tests/test_ccs.py"
;; XXX: These tests assume they are run on Windows.
"--ignore=tests/test_mi.py")
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'set-cryptography-version
(lambda _
(substitute* "tests/test_cryptography.py"
(("^latest_cryptography_version = @version@")
(format #f "latest_cryptography_version = ~s"
#$(package-version
(this-package-input "python-cryptography")))))))
(add-before 'check 'configure-tests
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "TRAVIS_TAG" "1")))))))
(native-inputs
(list nss-certs-for-test python-mock python-pytest python-setuptools))
(propagated-inputs (list python-cryptography python-pyjwt python-requests)) (propagated-inputs (list python-cryptography python-pyjwt python-requests))
(synopsis "Microsoft Authentication Library (MSAL) for Python") (synopsis "Microsoft Authentication Library (MSAL) for Python")
(description (description