[Numpy-discussion] Should we drop support for "one file" compilation mode?
Nathaniel Smith
njs at pobox.com
Mon Oct 5 18:26:17 EDT 2015
Hi all,
For a long time, NumPy has supported two different ways of being compiled:
"Separate compilation" mode: like most C projects, each .c file gets
compiled to a .o file, and then the .o files get linked together to
make a shared library. (This has been the default since 1.8.0.)
"One file" mode: first concatenate all the .c files together to make
one monster .c file, and then compile that .c file to make a shared
library. (This was the default before 1.8.0.)
Supporting these two different build modes creates a drag on
development progress; in particular Stefan recently ran into this in
this experiments with porting parts of the NumPy internals to Cython:
https://github.com/numpy/numpy/pull/6408
(I suspect the particular problem he's running into can be fixed b/c
so far he only has one .pyx file, but I also suspect that it will be
impossible to support "one file" mode once we have multiple .pyx
files.)
There are some rumors that "one file" mode might be needed on some
obscure platform somewhere, or that it might be necessary for
statically linking numpy into the CPython executable, but we can't
continue supporting things forever based only on rumors. If all we can
get are rumors, then eventually we have to risk breaking things just
to force anyone who cares to actually show up and explain what they
need so we can support it properly :-).
Would anyone object if we dropped support for the "one file" mode,
making "separate compilation" mandatory, e.g. in 1.11?
-n
--
Nathaniel J. Smith -- http://vorpus.org
More information about the NumPy-Discussion
mailing list