forked from pool/python-rdflib
- Add reproducible-doc-build.patch to make the build reproducible.
gh#RDFLib/rdflib#2645 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rdflib?expand=0&rev=79
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 8 08:07:39 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add reproducible-doc-build.patch to make the build reproducible.
|
||||||
|
gh#RDFLib/rdflib#2645
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 3 06:45:45 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Thu Apr 3 06:45:45 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@@ -37,6 +37,8 @@ URL: http://rdflib.net/
|
|||||||
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/rdflib/rdflib-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM sphinx8.patch gh#RDFLib/rdflib#2956 -- daniel.garcia@suse.com
|
# PATCH-FIX-UPSTREAM sphinx8.patch gh#RDFLib/rdflib#2956 -- daniel.garcia@suse.com
|
||||||
Patch0: sphinx8.patch
|
Patch0: sphinx8.patch
|
||||||
|
# PATCH-FIX-OPENSUSE reproducible-doc-build.patch gh#RDFLib/rdflib#2645 -- daniel.garcia@suse.com
|
||||||
|
Patch1: reproducible-doc-build.patch
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
|
26
reproducible-doc-build.patch
Normal file
26
reproducible-doc-build.patch
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
diff --git a/rdflib/term.py b/rdflib/term.py
|
||||||
|
index 3e397674..4e0cfcf1 100644
|
||||||
|
--- a/rdflib/term.py
|
||||||
|
+++ b/rdflib/term.py
|
||||||
|
@@ -23,6 +23,7 @@ underlying Graph:
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
+import sys
|
||||||
|
import abc
|
||||||
|
import re
|
||||||
|
from fractions import Fraction
|
||||||
|
@@ -483,7 +484,12 @@ class BNode(IdentifiedNode):
|
||||||
|
else:
|
||||||
|
node_id = sn_result
|
||||||
|
else:
|
||||||
|
- node_id = uuid4().hex
|
||||||
|
+ # Do not generate random id for doc, this will help with reproducible
|
||||||
|
+ # builds https://github.com/RDFLib/rdflib/issues/2645
|
||||||
|
+ if "sphinx-build" in sys.argv[0]:
|
||||||
|
+ node_id = "NODEID"
|
||||||
|
+ else:
|
||||||
|
+ node_id = uuid4().hex
|
||||||
|
# note, for two (and only two) string variables,
|
||||||
|
# concat with + is faster than f"{x}{y}"
|
||||||
|
value = _prefix + f"{node_id}"
|
Reference in New Issue
Block a user