[Python-ideas] Rewriting the build system (part 2)

Chris Barker chris.barker at noaa.gov
Mon Mar 16 18:39:22 CET 2015


On Mon, Mar 16, 2015 at 9:50 AM, Chris Angelico <rosuav at gmail.com> wrote:

> The tricky part here is defining the oldest supported version. "To
> build Python X.Y, you must already have Python ??? or later installed"
> - how do you pick the minimum? The older that minimum, the more warped
> the build code has to be


sure -- but it seems what's on the table now is: must be buildable by an
old version of C -- not even C99 which is nominally 16 years old...

So yeah, the build system itself would need to support a "old" python --
though probably python2.7 would be OK at this point -- sorry, not py3 yet,
but what can you do?

> If there is an already build python (like OS-X, any general purpose linux
> > distro, Windows if you don't mind point and clicking the python.org
> > installer, etc, then it's not really a "bootstrap".
>
> No, that's not what I'm talking about. I'm talking about trying to
> build Thunderbird and having to do a bunch of steps where I run this
> program, then run that, then let it chug its way through stuff, and
> then eventually it'll start building.


It sounds like that build setup suck, yes -- but not sure why that's
relevant. Clearly we don't want something that ugly. We want something that
is both easy and robust to configure for new platfroms, etc, and easy on
the end user to "jsut build" the source. All I"m proposing that is
requireing a not-very-recent python as a first step is only a big hurdle
for folks poritn got new platforms -- your use case would be, in
INSTALL.txt:

"""
1) You need at least python 2.7 to build this software.

try:

python --version

if it starts up and reports a version greater than 2.7, then you are all
set. If not, then It can probably be installed with your system package
manager:

apt_get install python

or similar. On Windows, you can download an installer for Python2.7 from
python.org

2) Once a python is working, you can build the this latest version from
source with:

./buildme
"""

Of course, there may be options, etc, but that's the basic deal.

And heck, if people REALLY want the ./configure && make && make install dance,
then we could ship a little configure script that does nothing but call the
python-based one...

Of course, all this is predicated on there BEING some miraculous
as-powerful-and-flexible-and-robust-as-autotools-but-much-easier-to-use
python-based build system.....

One more note: so adding a python dependency is a pain. But the current
system requires separate stems for Windows and *nix-y systems, and who
knows what for hypothetical systems that don't support autotools. So maybe
a python-based build system that worked on all the common platforms, with
an additional makefile that you have to hand-mangle to bootstrap a new
platform isn't any more to maintain.

-CHB

-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150316/6e1ab6af/attachment-0001.html>


More information about the Python-ideas mailing list