-
Notifications
You must be signed in to change notification settings - Fork 25
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
Do not run the code generator if PYERFA_USE_SYSTEM_LIBERFA=1 (Closes #38) #39
Do not run the code generator if PYERFA_USE_SYSTEM_LIBERFA=1 (Closes #38) #39
Conversation
Is this also related to #37? |
@avalentino - #37 is about the python wrappers only. But agreed with the issue raised here, and in fact a general problem: if one uses the system files, the system library may be out of date with the C code used here to generate the ufuncs. Though I guess there is at least some guarding against that by ufunc.c relying on the erfa header files (it is a bit the erfa docstrings are not part of the headers!). About the PR proper, wouldn't it make more sense for the logic to be that |
a3e528e
to
958e2f8
Compare
if
Just pushed a change that should go in de direction you described (I hope I have understood correctly your request). |
@avalentino - this looks good but let me push a fix for the apt-based CI run, so that we can check it works also on our CI run. Also, this seems like a PR for which input from @sergiopasra would be useful - would be bad if it turns out that to make using the system library easier on one distribution, it becomes harder on another! |
@avalentino - see #40 - if we put that in and you rebase, then hopefully all tests will pass here too. |
958e2f8
to
83a512c
Compare
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.
Very nice now!
The proposed change do not run the code generator (
erfa_generator.py
) when the user requires to use the system erfa library (PYERFA_USE_SYSTEM_LIBERFA=1
).NOTE: the change only works if the
core.py
andufunc.c
have been already generated in some way (e.g. if one uses the source tarball available on PyPi.io). It is not expected to work for a fresh git clone.An error is raised if the
core.py
andufunc.c
files are not found.