-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
MAINT: Make f2py generated file not contain the (local) date. #9780
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
Conversation
You need to change your PR title. |
The lines with "Revision" and "Date" were for subversion. I'd just remove all of them, including also the time and the outdated link. |
And you need to completely redo your commit message. See |
numpy/f2py/rules.py
Outdated
@@ -114,7 +114,7 @@ | |||
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, | |||
* written by Pearu Peterson <[email protected]>. | |||
* See http://cens.ioc.ee/projects/f2py2e/ | |||
* Generation date: """ + time.asctime(time.localtime(time.time())) + """ | |||
* Generation date: """ + time.asctime(time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + """ | |||
* $R""" + """evision:$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you remove this line and the one below?
numpy/f2py/rules.py
Outdated
@@ -114,7 +114,7 @@ | |||
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, | |||
* written by Pearu Peterson <[email protected]>. | |||
* See http://cens.ioc.ee/projects/f2py2e/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this line also.
numpy/f2py/rules.py
Outdated
@@ -114,7 +114,7 @@ | |||
* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition, | |||
* written by Pearu Peterson <[email protected]>. | |||
* See http://cens.ioc.ee/projects/f2py2e/ | |||
* Generation date: """ + time.asctime(time.localtime(time.time())) + """ | |||
* Generation date: """ + time.asctime(time.gmtime(int(os.environ.get('SOURCE_DATE_EPOCH', time.time())))) + """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to keep this, could you break it so that the line length is < 80 chars?
and use gmtime in order to be independent of timezone in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable.
because svn is not used anymore
I note that f2py is now released together with NumPy, so its own version number no longer tracks changes. If reproducibility requires a known version something more might be required. |
Merged, thanks @bmwiedemann. There may be more work needed here, but I don't know the precise aims that you have in the reproducibile build project. |
For now, my goal is for all 11800 openSUSE source packages to be able to build twice and produce identical binary packages (which was not the case for python-scipy before this patch, because of the timestamps). |
While working on the reproducible builds effort, I found that when building the python-scipy package for openSUSE Linux, there were slight differences between each build that can be avoided with this patch to
Allow to override build date
and use gmtime in order to be independent of timezone
in order to make builds reproducible.
See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.