[Python-Dev] Re: release22-maint branch broken

Tim Rice tim@multitalents.net
Mon, 25 Nov 2002 12:45:48 -0800 (PST)


On 25 Nov 2002, Michael Hudson wrote:

> Tim Rice <tim@multitalents.net> writes:
>
> > On Fri, 22 Nov 2002, A.M. Kuchling wrote:
> >
> > > Tim Rice wrote:
> > >
> > > >     raise DistutilsPlatformError(my_msg)
> > > > distutils.errors.DistutilsPlatformError: invalid Python installation:
> > > > unable to open /usr/local/lib/python2.2/config/Makefile (No such file
> > > > or directory)
> > > > gmake: *** [sharedmods] Error 1
> > >
> > > The revised version of sysconfig.py figures out if it's in the build
> > > directory by looking for a landmark file; the landmark is Modules/Setup.
> > > Does that file exist?
> >
> > Yes it does.
> >
> > I put some prints in
> > ...
> > argv0_path = os.path.dirname(os.path.abspath(sys.executable))
> > print argv0_path
> > landmark = os.path.join(argv0_path, "Modules", "Setup")
> > print landmark
> > if not os.path.isfile(landmark):
> >     python_build = 0
> >     print "python_build = 0"
> > elif os.path.isfile(os.path.join(argv0_path, "Lib", "os.py")):
> >     python_build = 1
> >     print "python_build = 1"
> > else:
> >     python_build = os.path.isfile(os.path.join(os.path.dirname(argv0_path),
> >                                                "Lib", "os.py"))
> >     print "else"
> > print python_build
> > del argv0_path, landmark
> > ...
> >
> > And get
> > ...
> > /usr/local/src/utils/Python-2
> > /usr/local/src/utils/Python-2/Modules/Setup
> > else
> > 0
> > running build
> > ...
> >
> > Could this breaking because I build outside of the source tree?
>
> I guess so.
>
> Where are you building?  Why is sys.executable
> /usr/local/src/utils/Python-2/python?  At least it looks like that's
> what's happened.

Yes, I'm building in  /usr/local/src/utils/Python-2

>
> Can you try (in your build directory)
>
> $ ./python
> ...
> >>> print sys.executable
>
> and see if that looks reasonable?
....
tim@uw711 65% pwd
/usr/local/src/utils/Python-2
tim@uw711 66% ./python
Python 2.2.2 (#1, Nov 22 2002, 12:59:39) [C] on unixware7
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.executable
/usr/local/src/utils/Python-2/python
>>>
....
>
> Cheers,
> M.
>
>

-- 
Tim Rice				Multitalents	(707) 887-1469
tim@multitalents.net