1
0

Accepting request 1117898 from home:bmwiedemann:branches:devel:languages:python:numeric

Add reproducible.patch to drop build date (boo#1047218)

OBS-URL: https://build.opensuse.org/request/show/1117898
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-quantities?expand=0&rev=17
This commit is contained in:
Matej Cepl 2023-10-16 11:13:16 +00:00 committed by Git OBS Bridge
parent b519c4c2b4
commit b6bf259912
3 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Oct 15 17:48:09 UTC 2023 - Bernhard Wiedemann <bwiedemann@suse.com>
- Add reproducible.patch to drop build date (boo#1047218)
-------------------------------------------------------------------
Wed May 31 08:28:44 UTC 2023 - Dirk Müller <dmueller@suse.com>

View File

@ -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}

24
reproducible.patch Normal file
View File

@ -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')