[Python-checkins] python/dist/src/Lib/distutils/command install.py,
1.68, 1.69
fdrake at users.sourceforge.net
fdrake at users.sourceforge.net
Fri Jun 25 19:03:16 EDT 2004
Update of /cvsroot/python/python/dist/src/Lib/distutils/command
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18122/Lib/distutils/command
Modified Files:
install.py
Log Message:
Make distutils "install --home" support all platforms.
Index: install.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/install.py,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** install.py 22 Mar 2004 22:22:05 -0000 1.68
--- install.py 25 Jun 2004 23:02:43 -0000 1.69
***************
*** 243,259 ****
"install-base/install-platbase -- not both")
# Next, stuff that's wrong (or dubious) only on certain platforms.
! if os.name == 'posix':
! if self.home and (self.prefix or self.exec_prefix):
! raise DistutilsOptionError, \
! ("must supply either home or prefix/exec-prefix -- " +
! "not both")
! else:
if self.exec_prefix:
self.warn("exec-prefix option ignored on this platform")
self.exec_prefix = None
- if self.home:
- self.warn("home option ignored on this platform")
- self.home = None
# Now the interesting logic -- so interesting that we farm it out
--- 243,255 ----
"install-base/install-platbase -- not both")
+ if self.home and (self.prefix or self.exec_prefix):
+ raise DistutilsOptionError, \
+ "must supply either home or prefix/exec-prefix -- not both"
+
# Next, stuff that's wrong (or dubious) only on certain platforms.
! if os.name != "posix":
if self.exec_prefix:
self.warn("exec-prefix option ignored on this platform")
self.exec_prefix = None
# Now the interesting logic -- so interesting that we farm it out
***************
*** 406,418 ****
def finalize_other (self): # Windows and Mac OS for now
! if self.prefix is None:
! self.prefix = os.path.normpath(sys.prefix)
! self.install_base = self.install_platbase = self.prefix
! try:
! self.select_scheme(os.name)
! except KeyError:
! raise DistutilsPlatformError, \
! "I don't know how to install stuff on '%s'" % os.name
# finalize_other ()
--- 402,418 ----
def finalize_other (self): # Windows and Mac OS for now
! if self.home is not None:
! self.install_base = self.install_platbase = self.home
! self.select_scheme("unix_home")
! else:
! if self.prefix is None:
! self.prefix = os.path.normpath(sys.prefix)
! self.install_base = self.install_platbase = self.prefix
! try:
! self.select_scheme(os.name)
! except KeyError:
! raise DistutilsPlatformError, \
! "I don't know how to install stuff on '%s'" % os.name
# finalize_other ()
More information about the Python-checkins
mailing list