From 6c53ebd8ced19eb6a79744219d585040547cd59d Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Tue, 18 Oct 2022 22:49:22 +0100
Subject: [PATCH 1/7] gnu: Add pytest-7.1
* gnu/packages/check.scm (python-pytest-7.1): New variable.
---
gnu/packages/check.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
@@ -39,6 +39,7 @@
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2022 David Elsing <david.elsing@posteo.net>
+;;; Copyright © 2022 Sharlatan Hellseher <sharlatanus@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -1093,6 +1094,28 @@ (define-public python-pytest
(define-public python-pytest-6 python-pytest)
+;; Astropy started using hard dependencies for Pytest 7+, which might
+;; happen for some other projects. It could be set as default in staging.
+(define-public python-pytest-7.1
+ (package
+ (inherit python-pytest)
+ (version "7.1.3")
+ (name "python-pytest")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest" version))
+ (sha256
+ (base32
+ "0f8c31v5r2kgjixvy267n0nhc4xsy65g3n9lz1i1377z5pn5ydjg"))))
+ (arguments
+ (substitute-keyword-arguments (package-arguments python-pytest)
+ ((#:phases phases #~%standard-phases)
+ #~(modify-phases #$phases
+ (add-before 'build 'pretend-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))))))
+
(define-public python-pytest-bootstrap
(package
(inherit python-pytest)
--
2.37.3