Commit 1e0269eb authored by Chris Withers's avatar Chris Withers

initial changes pending testing when a distribute egg is released

parent 6940dab5
...@@ -26,14 +26,20 @@ tmpeggs = tempfile.mkdtemp() ...@@ -26,14 +26,20 @@ tmpeggs = tempfile.mkdtemp()
is_jython = sys.platform.startswith('java') is_jython = sys.platform.startswith('java')
to_reload = False
try: try:
import pkg_resources import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
to_reload = True
raise ImportError
except ImportError: except ImportError:
ez = {} ez = {}
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' exec urllib2.urlopen('http://nightly.ziade.org/bootstraping.py'
).read() in ez ).read() in ez
ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
if to_reload:
reload(pkg_resources)
else:
import pkg_resources import pkg_resources
if sys.platform == 'win32': if sys.platform == 'win32':
...@@ -63,7 +69,7 @@ if is_jython: ...@@ -63,7 +69,7 @@ if is_jython:
quote(tmpeggs), 'zc.buildout' + VERSION], quote(tmpeggs), 'zc.buildout' + VERSION],
env=dict(os.environ, env=dict(os.environ,
PYTHONPATH= PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location ws.find(pkg_resources.Requirement.parse('distribute')).location
), ),
).wait() == 0 ).wait() == 0
...@@ -73,7 +79,7 @@ else: ...@@ -73,7 +79,7 @@ else:
'-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION, '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout' + VERSION,
dict(os.environ, dict(os.environ,
PYTHONPATH= PYTHONPATH=
ws.find(pkg_resources.Requirement.parse('setuptools')).location ws.find(pkg_resources.Requirement.parse('distribute')).location
), ),
) == 0 ) == 0
......
...@@ -30,16 +30,23 @@ for d in 'eggs', 'develop-eggs', 'bin': ...@@ -30,16 +30,23 @@ for d in 'eggs', 'develop-eggs', 'bin':
if os.path.isdir('build'): if os.path.isdir('build'):
shutil.rmtree('build') shutil.rmtree('build')
to_reload = False
try: try:
import pkg_resources import pkg_resources
if not hasattr(pkg_resources, '_distribute'):
to_reload = True
raise ImportError
except ImportError: except ImportError:
ez = {} ez = {}
exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' exec urllib2.urlopen('http://nightly.ziade.org/bootstraping.py'
).read() in ez ).read() in ez
ez['use_setuptools'](to_dir='eggs', download_delay=0) ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
if to_reload:
reload(pkg_resources)
else:
import pkg_resources import pkg_resources
subprocess.Popen( subprocess.Popen(
[sys.executable] + [sys.executable] +
['setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'], ['setup.py', '-q', 'develop', '-m', '-x', '-d', 'develop-eggs'],
......
...@@ -72,7 +72,7 @@ setup( ...@@ -72,7 +72,7 @@ setup(
packages = ['zc', 'zc.buildout'], packages = ['zc', 'zc.buildout'],
package_dir = {'': 'src'}, package_dir = {'': 'src'},
namespace_packages = ['zc'], namespace_packages = ['zc'],
install_requires = 'setuptools', install_requires = 'distribute',
include_package_data = True, include_package_data = True,
entry_points = {'console_scripts': entry_points = {'console_scripts':
['buildout = %s.buildout:main' % name]}, ['buildout = %s.buildout:main' % name]},
......
...@@ -67,7 +67,7 @@ setup( ...@@ -67,7 +67,7 @@ setup(
namespace_packages = ['zc', 'zc.recipe'], namespace_packages = ['zc', 'zc.recipe'],
install_requires = [ install_requires = [
'zc.buildout >=1.2.0', 'zc.buildout >=1.2.0',
'setuptools'], 'distribute'],
tests_require = ['zope.testing'], tests_require = ['zope.testing'],
test_suite = name+'.tests.test_suite', test_suite = name+'.tests.test_suite',
entry_points = {'zc.buildout': ['default = %s:Scripts' % name, entry_points = {'zc.buildout': ['default = %s:Scripts' % name,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment