-
Notifications
You must be signed in to change notification settings - Fork 49
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
Cleanup version #73
Cleanup version #73
Conversation
Had forgotten to update also the version returned by the various eraVersion* functions (unfortunately, not mentioned in the release procedure). So, need up do another release. No SOFA change, so only the micro update for the version number and revision update for the library.
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.
Actually, you don't need this. The macros PACKAGE_VERSION
and the like are defined in config.h
We can safely remove the defines before #ifdef HAVE_CONFIG_H
@sergiopasra - ah, yes that makes sense. I started this since over at p.s. While compiling, I also noticed that with my changes for the leap seconds, one cannot just |
Indeed, checking what exactly we do in So, perhaps the best way forward is still to merge this one, and then think a bit more about how to ensure we check that the version information is kept up to date. |
a8bf5e6
to
b2663ab
Compare
You have to include |
pyerfa's setup.py should run ./configure to generate config.h. After that you can compile manually. Probably. I admit I have no experience embedding configure scripts inside Python build system |
Related: liberfa/pyerfa#52 |
@sergiopasra actually one would need to run ./bootstrap.sh (which needs autotools). AFAIK Line 24 in 8e9b08e
which makes sense to me. Probably a good idea would be to raise a warning if #ifdef HAVE_CONFIG_H
#include <config.h>
#else
#warning ...
/* Define to the major version of this package. */
#define PACKAGE_VERSION_MAJOR 1
...
#endif /* HAVE_CONFIG_H */ |
Anyway I'm (slowly) working on a change in pyerfa to run bootstrap/configure if possible at build time. |
You only need autotools if you are a developer and you need to generate configure from configure.ac and Makefile.in from Makefile.am
Yes, this is the typical way of working with config.h It is used only if it has been created. The compilation line in the Makefile is something like:
If the macro is not defined, you still can compile, but you have to define the macros yourself, with
In my opinion, we should remove the macro definitions and let config.h do its thing. |
@sergiopasra yes, so in any case we need to improve the pyerfa
IMHO it is a good solution for liberfa as soon as we take care a writing a note in the docs. From a pyerfa perspective IMO the user expects that |
Maybe we can simply read |
@avalentino In theory, you could generate Furthermore, you would be adding a new dependency in pyerfa, the macro definitions inside
In my opinion, the best approach is to embed a released version of erfa inside pyerfa and delegate the work of building the library to @mhvk |
@sergiopasra actually the Idea was simply to run The point is that we are bundling a copy of liberfa and hence we should also bundle a proper I agree with you that replicating the logic that is already in the liberfa configuration machinery does not make sense. Running the The problem is that we shall also ensure that the build process completes successfully on platform that are not able to run the liberfa In this specific case one could simply add |
@avalentino You have to run
What platforms are those? |
@avalentino I see that you are using a submodule, so your version of liberfa doesn't have Let's say that you are not using the source tarball that is created for the users, instead you have a snapshot of the code that we use to generate the tarball. The tarball contains the ./configure, the git submodule doesn't |
yes, this is the point of confusion IMHO
yes, the idea is to run the bootstrap.sh only in the sdist command. Once the source distribution is on PyPi the user should only need to use the build, build_ext to install commands. |
windows? |
Please keep in mind that config.h won't be installed with a system liberfa and its dev package when |
Possible solutions:
In my opinion, 3 is the way to go... |
@sergiopasra I agree that option 3 is probably the safest one.
@bnavigator using system liberfa should be ok IMHO for what discussed here. |
Ok, I did not follow the complete discussion. I just wanted to make sure that you do not rely on a present config.h even when the liberfa/erfa subdir in pyerfa is not relevant to the installation. |
@sergiopasra , @bnavigator changes have been implemented in liberfa/pyerfa#53 in case you want to review them. |
@avalentino - with your changes at pyerfa, do you think it is still useful to do the corrections here? Alternatively, I think with your changes we can now follow @sergiopasra's advice above and just remove the backup version definitions - that would seem cleaner (one way only to do it, etc.). If so, no new version would seem needed, right? |
p.s. I ask in part since if no new version here is needed, we might as well do a release of pyerfa. |
IMHO we should implement the solution proposed by @sergiopasra, having the fallback version demonstrated to be quite problematic to manage. An I agree with you there is no need to make a liberfa release now.
Regarding the pyerfa I would like to add a couple of changes before the release:
|
OK, I'm going to go with the suggestion to just remove the version information in |
See #74. |
Arrgghh, after releasing and testing with pyerfa, I find out that I forgot to also update the version returned by the C functions. So, we need to do a bug-fix 1.7.2.
This PR also updates the release instructions, although really we should try to ensure that a given release number only has to be entered once!!