]> git.pld-linux.org Git - packages/python-jsonschema.git/commitdiff
- added nonet patch, add json-schema-validation.html as source instead of downloading
authorJakub Bogusz <qboosh@pld-linux.org>
Tue, 14 Apr 2020 16:49:19 +0000 (18:49 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Tue, 14 Apr 2020 16:49:19 +0000 (18:49 +0200)
python-jsonschema-nonet.patch [new file with mode: 0644]
python-jsonschema.spec

diff --git a/python-jsonschema-nonet.patch b/python-jsonschema-nonet.patch
new file mode 100644 (file)
index 0000000..ba65e32
--- /dev/null
@@ -0,0 +1,18 @@
+--- jsonschema-3.2.0/docs/jsonschema_role.py.orig      2019-10-08 03:37:30.000000000 +0200
++++ jsonschema-3.2.0/docs/jsonschema_role.py   2020-04-14 18:33:13.541326079 +0200
+@@ -63,15 +63,6 @@
+         if error.errno != errno.ENOENT:
+             raise
+-    request = urllib.Request(VALIDATION_SPEC, headers=headers)
+-    response = urllib.urlopen(request, cafile=certifi.where())
+-
+-    if response.code == 200:
+-        with open(spec_path, "w+b") as spec:
+-            spec.writelines(response)
+-            spec.seek(0)
+-            return html.parse(spec)
+-
+     with open(spec_path) as spec:
+         return html.parse(spec)
index 3a176a3a4f6c8b0e66e5dc72cb53262547ffd2b6..0457f68350682bce7f9adabbdea9a3516567ec83 100644 (file)
@@ -16,7 +16,10 @@ Group:               Libraries/Python
 #Source0Download: https://pypi.python.org/simple/jsonschema/
 Source0:       https://files.pythonhosted.org/packages/source/j/jsonschema/%{module}-%{version}.tar.gz
 # Source0-md5: f1a0b5011f05a02a8dee1070cd10a26d
+Source1:       https://json-schema.org/draft-07/json-schema-validation.html
+# Source1-md5: e920693b4c00338d439f0a2240218bcf
 Patch0:                %{name}-webcolors.patch
+Patch1:                %{name}-nonet.patch
 URL:           https://pypi.python.org/pypi/jsonschema
 %if %{with python2}
 BuildRequires: python-functools32
@@ -95,6 +98,10 @@ dla Pythona.
 %prep
 %setup -q -n %{module}-%{version}
 %patch0 -p1
+%patch1 -p1
+
+install -d docs/_cache
+cp -p %{SOURCE1} docs/_cache/spec.html
 
 %build
 %if %{with python2}
This page took 1.084122 seconds and 4 git commands to generate.