forked from pool/python-quantities
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
25 lines
968 B
Diff
25 lines
968 B
Diff
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')
|