upgrade inlined distribute_setup.py
This commit is contained in:
		
							parent
							
								
									0790f7a75f
								
							
						
					
					
						commit
						69fc6987ad
					
				| 
						 | 
					@ -13,6 +13,7 @@ Changes between 2.2.3 and 2.2.4
 | 
				
			||||||
- fix issue #143: call unconfigure/sessionfinish always when
 | 
					- fix issue #143: call unconfigure/sessionfinish always when
 | 
				
			||||||
  configure/sessionstart where called
 | 
					  configure/sessionstart where called
 | 
				
			||||||
- fix issue #144: better mangle test ids to junitxml classnames
 | 
					- fix issue #144: better mangle test ids to junitxml classnames
 | 
				
			||||||
 | 
					- upgrade distribute_setup.py to 0.6.27
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Changes between 2.2.2 and 2.2.3
 | 
					Changes between 2.2.2 and 2.2.3
 | 
				
			||||||
----------------------------------------
 | 
					----------------------------------------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,7 +46,7 @@ except ImportError:
 | 
				
			||||||
            args = [quote(arg) for arg in args]
 | 
					            args = [quote(arg) for arg in args]
 | 
				
			||||||
        return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 | 
					        return os.spawnl(os.P_WAIT, sys.executable, *args) == 0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DEFAULT_VERSION = "0.6.24"
 | 
					DEFAULT_VERSION = "0.6.27"
 | 
				
			||||||
DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 | 
					DEFAULT_URL = "http://pypi.python.org/packages/source/d/distribute/"
 | 
				
			||||||
SETUPTOOLS_FAKED_VERSION = "0.6c11"
 | 
					SETUPTOOLS_FAKED_VERSION = "0.6c11"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -63,7 +63,7 @@ Description: xxx
 | 
				
			||||||
""" % SETUPTOOLS_FAKED_VERSION
 | 
					""" % SETUPTOOLS_FAKED_VERSION
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def _install(tarball):
 | 
					def _install(tarball, install_args=()):
 | 
				
			||||||
    # extracting the tarball
 | 
					    # extracting the tarball
 | 
				
			||||||
    tmpdir = tempfile.mkdtemp()
 | 
					    tmpdir = tempfile.mkdtemp()
 | 
				
			||||||
    log.warn('Extracting in %s', tmpdir)
 | 
					    log.warn('Extracting in %s', tmpdir)
 | 
				
			||||||
| 
						 | 
					@ -81,7 +81,7 @@ def _install(tarball):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # installing
 | 
					        # installing
 | 
				
			||||||
        log.warn('Installing Distribute')
 | 
					        log.warn('Installing Distribute')
 | 
				
			||||||
        if not _python_cmd('setup.py', 'install'):
 | 
					        if not _python_cmd('setup.py', 'install', *install_args):
 | 
				
			||||||
            log.warn('Something went wrong during the installation.')
 | 
					            log.warn('Something went wrong during the installation.')
 | 
				
			||||||
            log.warn('See the error message above.')
 | 
					            log.warn('See the error message above.')
 | 
				
			||||||
    finally:
 | 
					    finally:
 | 
				
			||||||
| 
						 | 
					@ -306,6 +306,9 @@ def _create_fake_setuptools_pkg_info(placeholder):
 | 
				
			||||||
        log.warn('%s already exists', pkg_info)
 | 
					        log.warn('%s already exists', pkg_info)
 | 
				
			||||||
        return
 | 
					        return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if not os.access(pkg_info, os.W_OK):
 | 
				
			||||||
 | 
					        log.warn("Don't have permissions to write %s, skipping", pkg_info)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    log.warn('Creating %s', pkg_info)
 | 
					    log.warn('Creating %s', pkg_info)
 | 
				
			||||||
    f = open(pkg_info, 'w')
 | 
					    f = open(pkg_info, 'w')
 | 
				
			||||||
    try:
 | 
					    try:
 | 
				
			||||||
| 
						 | 
					@ -474,11 +477,20 @@ def _extractall(self, path=".", members=None):
 | 
				
			||||||
            else:
 | 
					            else:
 | 
				
			||||||
                self._dbg(1, "tarfile: %s" % e)
 | 
					                self._dbg(1, "tarfile: %s" % e)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					def _build_install_args(argv):
 | 
				
			||||||
 | 
					    install_args = []
 | 
				
			||||||
 | 
					    user_install = '--user' in argv
 | 
				
			||||||
 | 
					    if user_install and sys.version_info < (2,6):
 | 
				
			||||||
 | 
					        log.warn("--user requires Python 2.6 or later")
 | 
				
			||||||
 | 
					        raise SystemExit(1)
 | 
				
			||||||
 | 
					    if user_install:
 | 
				
			||||||
 | 
					        install_args.append('--user')
 | 
				
			||||||
 | 
					    return install_args
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def main(argv, version=DEFAULT_VERSION):
 | 
					def main(argv, version=DEFAULT_VERSION):
 | 
				
			||||||
    """Install or upgrade setuptools and EasyInstall"""
 | 
					    """Install or upgrade setuptools and EasyInstall"""
 | 
				
			||||||
    tarball = download_setuptools()
 | 
					    tarball = download_setuptools()
 | 
				
			||||||
    _install(tarball)
 | 
					    _install(tarball, _build_install_args(argv))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if __name__ == '__main__':
 | 
					if __name__ == '__main__':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -35,4 +35,5 @@ Changes between 2.2.3 and 2.2.4
 | 
				
			||||||
- fix issue #143: call unconfigure/sessionfinish always when
 | 
					- fix issue #143: call unconfigure/sessionfinish always when
 | 
				
			||||||
  configure/sessionstart where called
 | 
					  configure/sessionstart where called
 | 
				
			||||||
- fix issue #144: better mangle test ids to junitxml classnames
 | 
					- fix issue #144: better mangle test ids to junitxml classnames
 | 
				
			||||||
 | 
					- upgrade distribute_setup.py to 0.6.27
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue