python/nondist/sandbox/setuptools easy_install.py, 1.3, 1.4
Update of /cvsroot/python/python/nondist/sandbox/setuptools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29069 Modified Files: easy_install.py Log Message: Oddly enough, some setup.py files actually check __name__=='__main__' Index: easy_install.py =================================================================== RCS file: /cvsroot/python/python/nondist/sandbox/setuptools/easy_install.py,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- easy_install.py 29 May 2005 01:36:01 -0000 1.3 +++ easy_install.py 29 May 2005 06:41:14 -0000 1.4 @@ -184,7 +184,7 @@ ) elif multi is None: multi = True - + elif not multi: # explicit false, raise an error raise RuntimeError( @@ -337,7 +337,9 @@ try: sys.argv[:] = [setup_script, '-q', 'bdist_egg'] sys.path.insert(0,os.getcwd()) - execfile(setup_script, {'__file__':setup_script}) + execfile(setup_script, + {'__file__':setup_script, '__name__':'__main__'} + ) except SystemExit, v: if v.args and v.args[0]: raise RuntimeError( @@ -365,8 +367,6 @@ - - def install_egg(self, egg_path, zip_ok): import shutil destination = os.path.join(self.instdir, os.path.basename(egg_path)) @@ -383,10 +383,10 @@ shutil.move(egg_path, destination) else: shutil.copy2(egg_path, destination) - + elif os.path.isdir(egg_path): shutil.move(egg_path, destination) - + else: os.mkdir(destination) self._extract_zip(egg_path, destination) @@ -502,7 +502,7 @@ parser.add_option("-z", "--zip", action="store_true", dest="zip_ok", default=False, help="install package as a zipfile") - + parser.add_option("-m", "--multi-version", action="store_true", dest="multi", default=None, help="make apps have to require() a version") @@ -512,7 +512,7 @@ try: if not args: raise RuntimeError("No urls, filenames, or requirements specified") - + for spec in args: inst = Installer(options.instdir, options.zip_ok, options.multi) try:
participants (1)
-
pje@users.sourceforge.net