Bug#1000326: xrstools: please make the build reproducible

Chris Lamb lamby at debian.org
Sun Nov 21 17:14:23 GMT 2021


Source: xrstools
Version: 0.15.0+git20210910+c147919d-1
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
xrstools could not be built reproducibly.

This was caused by a default keyword argument in the documentation
which contained an absolute/full pathname.

Patch attached that uses the "if-blah-is-none-blah-equals" Python
idiom.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible_build.patch	1969-12-31 16:00:00.000000000 -0800
--- b/debian/patches/reproducible_build.patch	2021-11-21 09:08:37.210875808 -0800
@@ -0,0 +1,18 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2021-11-21
+
+--- xrstools-0.15.0+git20210910+c147919d.orig/XRStools/xrs_utilities.py
++++ xrstools-0.15.0+git20210910+c147919d/XRStools/xrs_utilities.py
+@@ -447,8 +447,9 @@ class bragg_refl:
+                                         np.sqrt(eta**2 - 1))**2
+         return reflectivity_curve, theta_B*180/np.pi, theta_B_correction
+         
+-    def get_nff(self,
+-        nff_path = os.path.join(data_installation_dir,'atomic_form_factors')):
++    def get_nff(self, nff_path=None):
++        if nff_path is None:
++            nff_path = os.path.join(data_installation_dir,'atomic_form_factors')
+         fname    = os.path.join(nff_path, self.crystal.lower()+'.nff')
+         table = np.loadtxt(fname, unpack = True, skiprows = 1)
+         table = np.transpose(table)
--- a/debian/patches/series	2021-11-21 08:56:13.288748075 -0800
--- b/debian/patches/series	2021-11-21 09:08:36.378870580 -0800
@@ -1,2 +1,3 @@
 remove_xrs_wizard_pyqt4.patch
 fix_python_syntax_error.patch
+reproducible_build.patch


More information about the debian-science-maintainers mailing list