Hi, as discussed with some other numpy developers, in particular Travis, I started to prepare my work related to scons for step-by-step merging into the trunk. The first step is done, and is in cleanconfig_rtm branch (rtm for ready to merge). This branch basically: - avoid introducing new SIZEOF_* like symbols, which are usually used by autotools. Python itself defines some of those, but should not. - avoid #ifdef/#endif in config.h files: normally, configuration headers should only contains define. This also makes their generation more straightforward, and more compatible with standard build tools (autotools/scons). This is the main goal of the branch - split configuration defines into two files: one private (config.h), which is not visible by any other packages compiled against numpy headers, and one public (numpyconfig.h), which replaces the config.h. If there is no problem, I would like to merge this one as quickly as possible: since it changes numpy.core public header, it may potentially break things, and I would prefer detecting those breakages now. cheers, David
David Cournapeau wrote:
Hi,
as discussed with some other numpy developers, in particular Travis, I started to prepare my work related to scons for step-by-step merging into the trunk. The first step is done, and is in cleanconfig_rtm branch (rtm for ready to merge).
This branch basically: - avoid introducing new SIZEOF_* like symbols, which are usually used by autotools. Python itself defines some of those, but should not. - avoid #ifdef/#endif in config.h files: normally, configuration headers should only contains define. This also makes their generation more straightforward, and more compatible with standard build tools (autotools/scons). This is the main goal of the branch
How did you get around using #ifdef etc? This concerns me to just change it, unless I'm convinced there is no problem.
- split configuration defines into two files: one private (config.h), which is not visible by any other packages compiled against numpy headers, and one public (numpyconfig.h), which replaces the config.h.
I think this should be fine.
If there is no problem, I would like to merge this one as quickly as possible: since it changes numpy.core public header, it may potentially break things, and I would prefer detecting those breakages now.
I'd like more reassurances about the #ifdef change, but other than that, it sounds fine. -Travis
cheers,
David _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
David Cournapeau wrote:
Hi,
as discussed with some other numpy developers, in particular Travis, I started to prepare my work related to scons for step-by-step merging into the trunk. The first step is done, and is in cleanconfig_rtm branch (rtm for ready to merge).
This branch basically: - avoid introducing new SIZEOF_* like symbols, which are usually used by autotools. Python itself defines some of those, but should not. - avoid #ifdef/#endif in config.h files: normally, configuration headers should only contains define. This also makes their generation more straightforward, and more compatible with standard build tools (autotools/scons). This is the main goal of the branch
How did you get around using #ifdef etc? This concerns me to just change it, unless I'm convinced there is no problem. I don't get around them, I just do not use them inside generated files. For example, NPY_ALLOW_THREADS is defined in ndarrayobject.h, now, depending on some values defined in the config headers. Having #ifdef inside generated files is a bit against the spirit of config
On Dec 20, 2007 10:29 AM, Travis E. Oliphant <oliphant@enthought.com> wrote: headers, and it makes also more complicated to generate them through standard tools (neither scons nor autoheader supports this, for example). But this is definitely a change which should be reviewed by someone, because it can break things if done wrong. I tried to be as careful as possible, but since there are several generators stages involved for config.h, it is always difficult to be 100 % sure that I have not done any mistake. David
On Dec 21, 2007 10:04 AM, David Cournapeau <cournape@gmail.com> wrote:
On Dec 20, 2007 10:29 AM, Travis E. Oliphant <oliphant@enthought.com> wrote:
How did you get around using #ifdef etc? This concerns me to just change it, unless I'm convinced there is no problem. I don't get around them, I just do not use them inside generated files. For example, NPY_ALLOW_THREADS is defined in ndarrayobject.h, now, depending on some values defined in the config headers. Having #ifdef inside generated files is a bit against the spirit of config headers, and it makes also more complicated to generate them through standard tools (neither scons nor autoheader supports this, for example). Travis, did you get any chance to look at it ? If the goal is to merge the changes needed for scons support for 1.0.5, I would prefer having a few days between the merge and the release to take care about problems
cheers, David
participants (2)
-
David Cournapeau
-
Travis E. Oliphant