mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: python-sphobjinv: Update to 2.3.1.1.
* gnu/packages/patches/python-sphobjinv-defer-ssl-import.patch: New patch. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/sphinx.scm (python-sphobjinv): Update to 2.3.1.1. [source]: Use patch. [arguments]: Replace check phase. [native-inputs]: New field. [propagated-inputs]: Remove python-fuzzywuzzy and python-levenshtein. Change-Id: Id60f45b222f286c8db55e9ce11378cf5ba82c603
This commit is contained in:
parent
188fee428f
commit
c5c7def1da
3 changed files with 51 additions and 4 deletions
|
@ -1934,6 +1934,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch \
|
%D%/packages/patches/python-pypdf-annotate-tests-appropriately.patch \
|
||||||
%D%/packages/patches/python-sip-include-dirs.patch \
|
%D%/packages/patches/python-sip-include-dirs.patch \
|
||||||
%D%/packages/patches/python-sgmllib3k-assertions.patch \
|
%D%/packages/patches/python-sgmllib3k-assertions.patch \
|
||||||
|
%D%/packages/patches/python-sphobjinv-defer-ssl-import.patch \
|
||||||
%D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \
|
%D%/packages/patches/python-sphinx-prompt-docutils-0.19.patch \
|
||||||
%D%/packages/patches/python-typeguard-python3.10.patch \
|
%D%/packages/patches/python-typeguard-python3.10.patch \
|
||||||
%D%/packages/patches/python-uqbar-python3.10.patch \
|
%D%/packages/patches/python-uqbar-python3.10.patch \
|
||||||
|
|
34
gnu/packages/patches/python-sphobjinv-defer-ssl-import.patch
Normal file
34
gnu/packages/patches/python-sphobjinv-defer-ssl-import.patch
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
See suggestion in https://github.com/bskinn/sphobjinv/issues/275
|
||||||
|
|
||||||
|
This prevents the module from creating an ssl context upon import, when,
|
||||||
|
during a build especially, a certificate file may not be present. Otherwise
|
||||||
|
module import would fail.
|
||||||
|
|
||||||
|
--- a/src/sphobjinv/inventory.py
|
||||||
|
+++ b/src/sphobjinv/inventory.py
|
||||||
|
@@ -30,7 +30,6 @@ Sphinx |objects.inv| files.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
-import ssl
|
||||||
|
import urllib.request as urlrq
|
||||||
|
from zlib import error as zlib_error
|
||||||
|
|
||||||
|
@@ -218,8 +217,15 @@ class Inventory:
|
||||||
|
#: zlib compression line for v2 |objects.inv| header
|
||||||
|
header_zlib = "# The remainder of this file is compressed using zlib."
|
||||||
|
|
||||||
|
- # Private class member for SSL context, since context creation is slow(?)
|
||||||
|
- _sslcontext = ssl.create_default_context(cafile=certifi.where())
|
||||||
|
+ # Private class member for SSL context
|
||||||
|
+ _sslcontext_ = None
|
||||||
|
+
|
||||||
|
+ @property
|
||||||
|
+ def _sslcontext(self):
|
||||||
|
+ import ssl
|
||||||
|
+ if not self._sslcontext_:
|
||||||
|
+ self._sslcontext_ = ssl.create_default_context(cafile=certifi.where())
|
||||||
|
+ return self._sslcontext_
|
||||||
|
|
||||||
|
@property
|
||||||
|
def count(self):
|
|
@ -1092,18 +1092,30 @@ executed during the Sphinx build process.")
|
||||||
(define-public python-sphobjinv
|
(define-public python-sphobjinv
|
||||||
(package
|
(package
|
||||||
(name "python-sphobjinv")
|
(name "python-sphobjinv")
|
||||||
(version "2.0.1")
|
(version "2.3.1.1")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "sphobjinv" version))
|
(uri (pypi-uri "sphobjinv" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"126lgm54c94ay3fci512ap4l607gak90pbz0fk98syxvj5izrrzx"))))
|
"10x4g92agj6aai0lj0xpcx58zlm1zamzws1w9dczsl1izpz07ij7"))
|
||||||
|
(patches (search-patches
|
||||||
|
"python-sphobjinv-defer-ssl-import.patch"))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
|
(arguments
|
||||||
|
(list
|
||||||
|
#:phases
|
||||||
|
#~(modify-phases %standard-phases
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(invoke "pytest")))))))
|
||||||
|
(native-inputs
|
||||||
|
(list python-dictdiffer python-pytest python-pytest-check
|
||||||
|
python-sphinx python-stdio-mgr))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
(list python-attrs python-certifi python-fuzzywuzzy
|
(list python-attrs python-certifi python-jsonschema))
|
||||||
python-jsonschema python-levenshtein))
|
|
||||||
(home-page "https://github.com/bskinn/sphobjinv")
|
(home-page "https://github.com/bskinn/sphobjinv")
|
||||||
(synopsis "Sphinx cross-reference tool")
|
(synopsis "Sphinx cross-reference tool")
|
||||||
(description "Sphinx objects.inv inspection/manipulation tool.")
|
(description "Sphinx objects.inv inspection/manipulation tool.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue