On Sat, Dec 4, 2010 at 15:41, Antoine Pitrou <solipsis@pitrou.net> wrote:
Le samedi 04 décembre 2010 à 13:39 +0000, Mark Dickinson a écrit :
> On Sat, Dec 4, 2010 at 1:23 PM, Mark Dickinson <dickinsm@gmail.com> wrote:
> > On Sat, Dec 4, 2010 at 11:41 AM, Antoine Pitrou <solipsis@pitrou.net> wrote:
> >> Er, normally you don't need *any* Python installed to build Python (be
> >> it 3.x or 2.x).
> >
> > Are you sure about this?  I remember needing an existing Python to
> > building Python 2.7 on a new python-less install of FreeBSD a couple
> > of months ago.  But maybe that was just an issue with timestamps on
> > files.  I'll see if I can reproduce.
>
> With a fresh checkout of the release27-maint branch on an Ubuntu
> 64-bit VM, with /usr/bin/python renamed to /usr/bin/python_not_here, a
> './configure && make' fails with:

How about with the release tarball? Perhaps SVN doesn't get timestamps
right.


My original problem was that I was re-running 'make' on a svn py3k branch checkout, which already had a compiled ./python exe in its root (Python 3.2, of course). Since the script Objects/typeslots.py (which Martin checked in just yesterday) required Python 2, this failed, although "python" on my machine actually refers to 2.6.5. The failure then happened since in the root of the Python build, "python" referred to the local Python 3 executable. Relying on timestamps sounds a bit too brittle.

I think it would be nice if:

1. Parts of the Makefile that use Python checked if Python is installed and generate a useful error if not.
2. All Python scripts that are part of the build should be 2-vs-3 version agnostic for the time being (= until Python 2 is distant history, which won't happen soon)

Eli