Simplify setup.py#301
Conversation
| config_h.write_text(version_definitions) | ||
| else: | ||
| warn("unable to get liberfa version") | ||
| if config_h.exists(): |
There was a problem hiding this comment.
As far as I can tell the if-statement should have been removed when 0148ea0 removed the accompanying elif-block.
There was a problem hiding this comment.
Looking at 0148ea0, the problem is that without a config.h it is not possible to generate a valid sdist.
I think (not sure by the way) that it is still possible to build liberfa without config.h but in that case HAVE_CONFIG_H should not be set.
IMHO the old behavior (pre 0148ea0) was correct.
If you still want to simplify then at least the warning above should become a raise SomeException(...), maybe.
| config_h.write_text(version_definitions) | ||
| else: | ||
| warn("unable to get liberfa version") | ||
| if config_h.exists(): |
There was a problem hiding this comment.
Looking at 0148ea0, the problem is that without a config.h it is not possible to generate a valid sdist.
I think (not sure by the way) that it is still possible to build liberfa without config.h but in that case HAVE_CONFIG_H should not be set.
IMHO the old behavior (pre 0148ea0) was correct.
If you still want to simplify then at least the warning above should become a raise SomeException(...), maybe.
| } | ||
| include_dirs.extend(map(str, [ERFA_SRC, LIBERFADIR])) | ||
| define_macros.append(("HAVE_CONFIG_H", "1")) | ||
|
|
There was a problem hiding this comment.
This is not OK if the user wants to use the system version of liberfa (PYERFA_USE_SYSTEM_LIBERFA set in the environment).
The last two instructions should be part of the else clause.
|
Apparently these is some issue with the CI. |
There are a handful of simplifications that can be applied to
setup.pywithout changing what it does.