[Zope-Coders] Re: [Zope-Checkins] CVS: Zope/inst - setup.py:1.1.2.2
Guido van Rossum
guido@python.org
Sun, 06 Oct 2002 07:32:18 -0400
> I will recheck that it's necessary. It made things work for me. ;-)
>
> ----- Original Message -----
> From: "Chris Withers" <chrisw@nipltd.com>
> To: "Chris McDonough" <chrism@zope.com>
> Cc: <zope-coders@zope.org>
> Sent: Saturday, October 05, 2002 8:07 AM
> Subject: Re: [Zope-Checkins] CVS: Zope/inst - setup.py:1.1.2.2
>
>
> > Chris McDonough wrote:
> > >
> > > AUTHOR = 'Zope Corporation and Contributors'
> > > +if sys.platform == 'win32':
> > > + def abspath(path): return path
> > > + os.path.abspath = abspath
> >
> > that's pretty extreme :-S
> >
> > What necessetated that?
You probably want to test for absence of os.path.abspath rather than
Win32. Also, a better fallback is this:
def abspath(path):
if not os.path.isabs(path):
return os.path.join(os.getcwd(), path)
--Guido van Rossum (home page: http://www.python.org/~guido/)