Changeset 13707
- Timestamp:
- 17 Feb 2016, 13:30:40 (9 years ago)
- Location:
- main/waeup.ikoba/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/bootstrap.py
r12455 r13707 26 26 from optparse import OptionParser 27 27 28 tmpeggs = tempfile.mkdtemp() 28 __version__ = '2015-07-01' 29 # See zc.buildout's changelog if this version is up to date. 30 31 tmpeggs = tempfile.mkdtemp(prefix='bootstrap-') 29 32 30 33 usage = '''\ … … 41 44 42 45 parser = OptionParser(usage=usage) 43 parser.add_option("-v", "--version", help="use a specific zc.buildout version") 44 46 parser.add_option("--version", 47 action="store_true", default=False, 48 help=("Return bootstrap.py version.")) 45 49 parser.add_option("-t", "--accept-buildout-test-releases", 46 50 dest='accept_buildout_test_releases', … … 60 64 action="store_true", default=False, 61 65 help=("Let bootstrap.py use existing site packages")) 66 parser.add_option("--buildout-version", 67 help="Use a specific zc.buildout version") 62 68 parser.add_option("--setuptools-version", 63 help="use a specific setuptools version") 64 69 help="Use a specific setuptools version") 70 parser.add_option("--setuptools-to-dir", 71 help=("Allow for re-use of existing directory of " 72 "setuptools versions")) 65 73 66 74 options, args = parser.parse_args() 75 if options.version: 76 print("bootstrap.py version %s" % __version__) 77 sys.exit(0) 78 67 79 68 80 ###################################################################### … … 70 82 71 83 try: 72 if options.allow_site_packages:73 import setuptools74 import pkg_resources75 84 from urllib.request import urlopen 76 85 except ImportError: … … 78 87 79 88 ez = {} 80 exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) 89 if os.path.exists('ez_setup.py'): 90 exec(open('ez_setup.py').read(), ez) 91 else: 92 exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) 81 93 82 94 if not options.allow_site_packages: … … 89 101 if hasattr(site, 'getsitepackages'): 90 102 for sitepackage_path in site.getsitepackages(): 91 sys.path[:] = [x for x in sys.path if sitepackage_path not in x] 103 # Strip all site-packages directories from sys.path that 104 # are not sys.prefix; this is because on Windows 105 # sys.prefix is a site-package directory. 106 if sitepackage_path != sys.prefix: 107 sys.path[:] = [x for x in sys.path 108 if sitepackage_path not in x] 92 109 93 110 setup_args = dict(to_dir=tmpeggs, download_delay=0) … … 95 112 if options.setuptools_version is not None: 96 113 setup_args['version'] = options.setuptools_version 114 if options.setuptools_to_dir is not None: 115 setup_args['to_dir'] = options.setuptools_to_dir 97 116 98 117 ez['use_setuptools'](**setup_args) … … 111 130 ws = pkg_resources.working_set 112 131 132 setuptools_path = ws.find( 133 pkg_resources.Requirement.parse('setuptools')).location 134 135 # Fix sys.path here as easy_install.pth added before PYTHONPATH 113 136 cmd = [sys.executable, '-c', 137 'import sys; sys.path[0:0] = [%r]; ' % setuptools_path + 114 138 'from setuptools.command.easy_install import main; main()', 115 139 '-mZqNxd', tmpeggs] … … 124 148 cmd.extend(['-f', find_links]) 125 149 126 setuptools_path = ws.find(127 pkg_resources.Requirement.parse('setuptools')).location128 129 150 requirement = 'zc.buildout' 130 version = options. version151 version = options.buildout_version 131 152 if version is None and not options.accept_buildout_test_releases: 132 153 # Figure out the most recent final version of zc.buildout. … … 168 189 169 190 import subprocess 170 if subprocess.call(cmd , env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:191 if subprocess.call(cmd) != 0: 171 192 raise Exception( 172 193 "Failed to execute command:\n%s" % repr(cmd)[1:-1]) -
main/waeup.ikoba/trunk/versions.cfg
r12837 r13707 2 2 [buildout] 3 3 # default set of versions we use. 4 extends= http://grok.zope.org/releaseinfo/grok-1.1.cfg 4 #extends = http://grok.zope.org/releaseinfo/grok-1.1.cfg 5 extends = grok-1.1.cfg 5 6 6 7 versions = versions
Note: See TracChangeset for help on using the changeset viewer.