diff --git a/python-quantities.changes b/python-quantities.changes index fb67cb3..519ce2f 100644 --- a/python-quantities.changes +++ b/python-quantities.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Oct 15 17:48:09 UTC 2023 - Bernhard Wiedemann + +- Add reproducible.patch to drop build date (boo#1047218) + ------------------------------------------------------------------- Wed May 31 08:28:44 UTC 2023 - Dirk Müller diff --git a/python-quantities.spec b/python-quantities.spec index feea9d8..6f7469b 100644 --- a/python-quantities.spec +++ b/python-quantities.spec @@ -23,6 +23,7 @@ Summary: Package for physical quantities with units License: BSD-3-Clause URL: https://github.com/python-quantities/python-quantities/ Source: https://files.pythonhosted.org/packages/source/q/quantities/quantities-%{version}.tar.gz +Patch0: reproducible.patch BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module numpy >= 1.16} BuildRequires: %{python_module pip} diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..ca24687 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,24 @@ +https://github.com/python-quantities/python-quantities/issues/225 + +Drop date from generated files for reproducible builds. + +Index: quantities-0.14.1/setup.py +=================================================================== +--- quantities-0.14.1.orig/setup.py ++++ quantities-0.14.1/setup.py +@@ -1,7 +1,6 @@ + from setuptools import Command, setup + from setuptools.command.build_py import build_py as _build + from setuptools.command.sdist import sdist as _sdist +-from datetime import datetime + + + class data(Command): +@@ -24,7 +23,6 @@ class data(Command): + with open('quantities/constants/_codata.py', 'w') as f: + f.write('# THIS FILE IS AUTOMATICALLY GENERATED\n') + f.write('# ANY CHANGES MADE HERE WILL BE LOST\n') +- f.write(f'# LAST GENERATED: {datetime.now()}\n\n') + f.write('physical_constants = {}\n\n') + for line in data: + name = line[:55].rstrip().replace('mag.','magnetic')