Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_codata.py varies between builds #225

Open
bmwiedemann opened this issue Jul 28, 2023 · 0 comments
Open

_codata.py varies between builds #225

bmwiedemann opened this issue Jul 28, 2023 · 0 comments

Comments

@bmwiedemann
Copy link

While working on reproducible builds for openSUSE, I found that
our python-quantities package always had variations in _codata.py

This can be fixed with

--- a/setup.py
+++ b/setup.py
@@ -24,7 +24,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')

or with a more complex patch to allow to override the build date https://reproducible-builds.org/docs/source-date-epoch/#python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant