Source: xrstools Version: 0.15.0+git20210910+c147919d-1 Severity: wishlist Tags: patch User: [email protected] Usertags: timestamps X-Debbugs-Cc: [email protected]
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 `. `'` [email protected] / chris-lamb.co.uk `-
--- 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 <[email protected]> +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

