[med-svn] [Git][med-team/pydicom][master] add patch to deactivate performance footer in doc package
Karsten Schöke (@karso)
gitlab at salsa.debian.org
Tue May 12 15:29:15 BST 2026
Karsten Schöke pushed to branch master at Debian Med / pydicom
Commits:
3b51df37 by Karsten Schöke at 2026-05-12T15:48:14+02:00
add patch to deactivate performance footer in doc package
This is nessesary for reproducible builds.
- - - - -
6 changed files:
- debian/changelog
- + debian/patches/doc-conf.py-deactivate-performance-datafooter-in-doc.patch
- + debian/patches/fix-example-for-reproducible-build.patch
- debian/patches/pytest.ini-insert-file-to-deaktivate-tests.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+pydicom (3.0.2-2) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * add patch to deactivate performance footer in doc package
+
+ -- Karsten Schöke <karsten.schoeke at geobasis-bb.de> Sat, 09 May 2026 13:46:16 +0200
+
pydicom (3.0.2-1) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/doc-conf.py-deactivate-performance-datafooter-in-doc.patch
=====================================
@@ -0,0 +1,23 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Tue, 12 May 2026 12:30:39 +0200
+Subject: doc/conf.py deactivate performance datafooter in doc
+ Make the build reproducible
+Forwarded: not-needed
+---
+ doc/conf.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/doc/conf.py b/doc/conf.py
+index 6ab1ebe..b5ae417 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -116,6 +116,9 @@ sphinx_gallery_conf = {
+ # to make references clickable
+ "doc_module": "pydicom",
+ "reference_url": {"pydicom": None},
++ #no perfdata footer on documents
++ "show_memory": False,
++ "min_reported_time": 1e9
+ }
+
+ napoleon_google_docstring = False
=====================================
debian/patches/fix-example-for-reproducible-build.patch
=====================================
@@ -0,0 +1,56 @@
+From: =?utf-8?q?Karsten_Sch=C3=B6ke?= <karsten.schoeke at geobasis-bb.de>
+Date: Tue, 12 May 2026 15:34:55 +0200
+Subject: fix example for reproducible build.
+ Removal of the display of temporary files containing hashes in their names,
+ thereby rendering the reproducible build impossible.
+
+Forwarded: not-needed
+---
+ examples/input_output/plot_read_fileset.py | 2 +-
+ examples/input_output/plot_write_dicom.py | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/examples/input_output/plot_read_fileset.py b/examples/input_output/plot_read_fileset.py
+index 7705c0e..60d0c75 100644
+--- a/examples/input_output/plot_read_fileset.py
++++ b/examples/input_output/plot_read_fileset.py
+@@ -110,7 +110,7 @@ tdir = TemporaryDirectory()
+ new_fileset = fs.copy(tdir.name)
+ print(f"\nOriginal File-set still at {fs.path}")
+ root = Path(new_fileset.path)
+-print(f"File-set copied to {root} and contains the following files:")
++print(f"File-set copied to tempfile and contains the following files:")
+ # Note how the original File-set directory layout has been changed to
+ # the structure used by pydicom
+ for p in sorted(root.glob("**/*")):
+diff --git a/examples/input_output/plot_write_dicom.py b/examples/input_output/plot_write_dicom.py
+index 11d3443..75f4cdc 100644
+--- a/examples/input_output/plot_write_dicom.py
++++ b/examples/input_output/plot_write_dicom.py
+@@ -28,7 +28,7 @@ ds.PatientID = "123456"
+ # Set creation date/time
+ dt = datetime.datetime.now()
+ ds.ContentDate = dt.strftime("%Y%m%d")
+-ds.ContentTime = dt.strftime("%H%M%S.%f") # long format with micro seconds
++# ds.ContentTime = dt.strftime("%H%M%S.%f") # long format with micro seconds
+
+ print("Setting file meta information...")
+ # Populate required values for file meta information
+@@ -42,14 +42,14 @@ file_meta.TransferSyntaxUID = ExplicitVRLittleEndian
+ ds.file_meta = file_meta
+
+ path = Path(tempfile.NamedTemporaryFile(suffix=".dcm").name)
+-print(f"Writing dataset to: {path}")
++print(f"Writing dataset to tempfile")
+ ds.save_as(path, enforce_file_format=True)
+
+ # reopen the data just for checking
+-print(f"Load dataset from: {path} ...")
++print(f"Load dataset from: tempfile ...")
+ ds = pydicom.dcmread(path)
+ print(ds)
+
+ # remove the created file
+-print(f"Deleting file: {path} ...")
++print(f"Deleting file: tempfile ...")
+ path.unlink()
=====================================
debian/patches/pytest.ini-insert-file-to-deaktivate-tests.patch
=====================================
@@ -10,7 +10,7 @@ Forwarded: not-needed
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
-index 0000000..74f20af
+index 0000000..a76edd1
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,20 @@
=====================================
debian/patches/series
=====================================
@@ -1,3 +1,5 @@
import-metadata-version-string.patch
pytest.ini-insert-file-to-deaktivate-tests.patch
doc-conf.py-sphinx-use-local-inventory-references-fo.patch
+doc-conf.py-deactivate-performance-datafooter-in-doc.patch
+fix-example-for-reproducible-build.patch
=====================================
debian/rules
=====================================
@@ -7,11 +7,17 @@ export PYBUILD_NAME=pydicom
export PYBUILD_AFTER_INSTALL=rm -fr {destdir}/usr/lib/python3*/dist-packages/${PYBUILD_NAME}/data/charset_files/FileInfo.txt; \
find {destdir}/usr/lib/python3*/dist-packages/${PYBUILD_NAME} -name 'README*' -delete
+#for clean searchindex.js in doc package
+#importend for reproducible builds
+export PYTHONHASHSEED=0
+export LC_ALL=C
+export LANG=C
+
%:
dh $@ --buildsystem=pybuild
execute_before_dh_sphinxdoc:
ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))
- cd doc; PYTHONPATH=$(CURDIR)/src sphinx-build -N -b html . $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html
+ cd doc; PYTHONPATH=$(CURDIR)/src sphinx-build -j1 -N -b html . $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html
find $(CURDIR)/debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)-doc/html -type f -exec sed -i 's,$(CURDIR),,g' {} +
endif
View it on GitLab: https://salsa.debian.org/med-team/pydicom/-/commit/3b51df374505460b46a473bec9cf4a1b09c5d734
--
View it on GitLab: https://salsa.debian.org/med-team/pydicom/-/commit/3b51df374505460b46a473bec9cf4a1b09c5d734
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260512/5319280b/attachment-0001.htm>
More information about the debian-med-commit
mailing list