[Checkins] SVN: zc.buildout/branch/regebro-python3/src/zc/buildout/ Nope, there is a circular dependency between zc.recipe.egg and zc.buildout as well. Giving up for now. Suggested path forward: Moving zc.recipe.egg into zc.buildout itself, and making zc.recipe.egg a dummy module.
Lennart Regebro
regebro at gmail.com
Fri Apr 16 12:38:18 EDT 2010
Log message for revision 110984:
Nope, there is a circular dependency between zc.recipe.egg and zc.buildout as well. Giving up for now. Suggested path forward: Moving zc.recipe.egg into zc.buildout itself, and making zc.recipe.egg a dummy module.
Changed:
U zc.buildout/branch/regebro-python3/src/zc/buildout/buildout.py
U zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py
U zc.buildout/branch/regebro-python3/src/zc/buildout/testrecipes.py
U zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py
-=-
Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/buildout.py 2010-04-16 16:23:33 UTC (rev 110983)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/buildout.py 2010-04-16 16:38:18 UTC (rev 110984)
@@ -13,7 +13,6 @@
##############################################################################
"""Buildout main script
"""
-
from .rmtree import rmtree
try:
from hashlib import md5
@@ -23,10 +22,12 @@
try:
from collections import MutableMapping as DictMixin
+ import configparser
except ImportError:
# Python < 2.6
from UserDict import DictMixin
-import configparser
+ import ConfigParser as configparser
+
import copy
import distutils.errors
import glob
@@ -42,6 +43,7 @@
import zc.buildout
import zc.buildout.download
import zc.buildout.easy_install
+from zc.buildout.py2compat import prn
realpath = zc.buildout.easy_install.realpath
@@ -81,18 +83,18 @@
def _print_annotate(data):
sections = list(data.keys())
sections.sort()
- print()
- print("Annotated sections")
- print("="*len("Annotated sections"))
+ prn()
+ prn("Annotated sections")
+ prn("="*len("Annotated sections"))
for section in sections:
- print()
- print('[%s]' % section)
+ prn()
+ prn('[%s]' % section)
keys = list(data[section].keys())
keys.sort()
for key in keys:
value, notes = data[section][key]
keyvalue = "%s= %s" % (key, value)
- print(keyvalue)
+ prn(keyvalue)
line = ' '
for note in notes.split():
if note == '[+]':
@@ -100,9 +102,9 @@
elif note == '[-]':
line = '-= '
else:
- print(line, note)
+ prn(line, note)
line = ' '
- print()
+ prn()
def _unannotate_section(section):
@@ -159,7 +161,7 @@
base = os.path.dirname(config_file)
if not os.path.exists(config_file):
if command == 'init':
- print('Creating %r.' % config_file)
+ prn('Creating %r.' % config_file)
open(config_file, 'w').write('[buildout]\nparts = \n')
elif command == 'setup':
# Sigh. This model of a buildout instance
@@ -438,11 +440,11 @@
if self._log_level < logging.DEBUG:
sections = list(self)
sections.sort()
- print()
- print('Configuration data:')
+ prn()
+ prn('Configuration data:')
for section in self._data:
_save_options(section, self[section], sys.stdout)
- print()
+ prn()
# compute new part recipe signatures
@@ -760,7 +762,7 @@
f = open(installed, 'w')
_save_options('buildout', installed_options['buildout'], f)
for part in installed_options['buildout']['parts'].split():
- print(file=f)
+ prn(file=f)
_save_options(part, installed_options[part], f)
f.close()
@@ -1293,10 +1295,10 @@
value = '%(__buildout_space_n__)s' + value[2:]
if value.endswith('\n\t'):
value = value[:-2] + '%(__buildout_space_n__)s'
- print(option, '=', value, file=f)
+ prn(option, '=', value, file=f)
def _save_options(section, options, f):
- print('[%s]' % section, file=f)
+ prn('[%s]' % section, file=f)
items = list(options.items())
items.sort()
for option, value in items:
@@ -1602,7 +1604,7 @@
"""
def _help():
- print(_usage)
+ prn(_usage)
sys.exit(0)
def main(args=None):
Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py 2010-04-16 16:23:33 UTC (rev 110983)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/testing.py 2010-04-16 16:38:18 UTC (rev 110984)
@@ -15,8 +15,12 @@
$Id$
"""
-
-import http.server
+try:
+ from http.server import HTTPServer, BaseHTTPRequestHandler
+ from urllib.request import urlopen
+except ImportError:
+ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
+ from urllib2 import urlopen
import errno
import logging
import os
@@ -30,11 +34,10 @@
import tempfile
import threading
import time
-import urllib.request, urllib.error, urllib.parse
-
import zc.buildout.buildout
import zc.buildout.easy_install
from zc.buildout.rmtree import rmtree
+from zc.buildout.py2compat import prn
fsync = getattr(os, 'fsync', lambda fileno: None)
is_win32 = sys.platform == 'win32'
@@ -49,7 +52,7 @@
and os.path.exists(path+'-script.py')
):
path = path+'-script.py'
- print(open(path).read(), end=' ')
+ prn(open(path).read(), end=' ')
def ls(dir, *subs):
if subs:
@@ -58,12 +61,12 @@
names.sort()
for name in names:
if os.path.isdir(os.path.join(dir, name)):
- print('d ', end=' ')
+ prn('d ', end=' ')
elif os.path.islink(os.path.join(dir, name)):
- print('l ', end=' ')
+ prn('l ', end=' ')
else:
- print('- ', end=' ')
- print(name)
+ prn('- ', end=' ')
+ prn(name)
def mkdir(*path):
os.mkdir(os.path.join(*path))
@@ -110,7 +113,7 @@
return result
def get(url):
- return urllib.request.urlopen(url).read()
+ return urlopen(url).read()
def _runsetup(setup, executable, *args):
if os.path.isdir(setup):
@@ -313,10 +316,10 @@
for f in test.globs['__tear_downs']:
f()
-class Server(http.server.HTTPServer):
+class Server(HTTPServer):
def __init__(self, tree, *args):
- http.server.HTTPServer.__init__(self, *args)
+ HTTPServer.__init__(self, *args)
self.tree = os.path.abspath(tree)
__run = True
@@ -327,7 +330,7 @@
def handle_error(self, *_):
self.__run = False
-class Handler(http.server.BaseHTTPRequestHandler):
+class Handler(BaseHTTPRequestHandler):
Server.__log = False
@@ -397,7 +400,7 @@
def log_request(self, code):
if self.__server.__log:
- print('%s %s %s' % (self.command, code, self.path))
+ prn('%s %s %s' % (self.command, code, self.path))
def _run(tree, port):
server_address = ('localhost', port)
@@ -430,7 +433,7 @@
def stop_server(url, thread=None):
try:
- urllib.request.urlopen(url+'__stop__')
+ urlopen(url+'__stop__')
except Exception:
pass
if thread is not None:
Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/testrecipes.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/testrecipes.py 2010-04-16 16:23:33 UTC (rev 110983)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/testrecipes.py 2010-04-16 16:38:18 UTC (rev 110984)
@@ -10,7 +10,7 @@
items = list(self.options.items())
items.sort()
for option, value in items:
- print(" %s=%r" % (option, value))
+ prn(" %s=%r" % (option, value))
return ()
update = install
Modified: zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py 2010-04-16 16:23:33 UTC (rev 110983)
+++ zc.buildout/branch/regebro-python3/src/zc/buildout/tests.py 2010-04-16 16:38:18 UTC (rev 110984)
@@ -22,6 +22,7 @@
import zc.buildout.easy_install
import zc.buildout.testing
import zc.buildout.testselectingpython
+from zc.buildout.py2compat import prn
import zipfile
os_path_sep = os.path.sep
@@ -47,7 +48,7 @@
... parts =
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
>>> ls('develop-eggs')
@@ -74,7 +75,7 @@
... parts =
... ''')
- >>> print(system(join('bin', 'buildout')+' -vv'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(join('bin', 'buildout')+' -vv'), end=' ') # doctest: +ELLIPSIS
Installing...
Develop: '/sample-buildout/foo'
...
@@ -85,7 +86,7 @@
- foo.egg-link
- zc.recipe.egg.egg-link
- >>> print(system(join('bin', 'buildout')+' -vvv'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(join('bin', 'buildout')+' -vvv'), end=' ') # doctest: +ELLIPSIS
Installing...
Develop: '/sample-buildout/foo'
in: '/sample-buildout/foo'
@@ -126,7 +127,7 @@
... z = ${buildout:x}
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
While:
Initializing.
@@ -148,7 +149,7 @@
... x = ${bui$ldout:y}
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Initializing.
Getting section buildout.
@@ -165,7 +166,7 @@
... x = ${buildout:y{z}
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Initializing.
Getting section buildout.
@@ -184,7 +185,7 @@
... x = ${parts}
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Initializing.
Getting section buildout.
@@ -201,7 +202,7 @@
... x = ${buildout:y:z}
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Initializing.
Getting section buildout.
@@ -218,7 +219,7 @@
... parts = x
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Installing.
Getting section x.
@@ -236,7 +237,7 @@
... foo = 1
... ''')
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')), end=' ')
While:
Installing.
Error: Missing option: x:recipe
@@ -285,7 +286,7 @@
... samplez
... ''' % globals())
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/sampley'
Develop: '/sample-buildout/samplez'
Installing eggs.
@@ -318,7 +319,7 @@
If we use the verbose switch, we can see where requirements are coming from:
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
We have a develop egg: zc.buildout 1.0.0
We have the best distribution that satisfies 'setuptools'.
@@ -369,7 +370,7 @@
... eggs = samplea
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/sampley'
Develop: '/sample-buildout/samplea'
Develop: '/sample-buildout/sampleb'
@@ -446,14 +447,14 @@
>>> os.chdir(sample_buildout)
>>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Installing debug.
If we run the buildout again, we shoudn't get a message about
uninstalling anything because the configuration hasn't changed.
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Updating debug.
"""
@@ -517,7 +518,7 @@
>>> write('demo', 'demo.py',
... '''
... def main():
- ... print('Python 2.5')
+ ... prn('Python 2.5')
... ''')
>>> write('buildout.cfg',
@@ -527,7 +528,7 @@
... parts =
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/demo'
>>> import zc.buildout.easy_install
@@ -537,7 +538,7 @@
... ['demo'], ws, sys.executable, 'bin'))
True
- >>> print(system(join('bin', 'demo')), end=' ')
+ >>> prn(system(join('bin', 'demo')), end=' ')
Python 2.5
Now, finally, let's test _get_version:
@@ -556,7 +557,7 @@
... x = ${foo:bar}
... ''')
- >>> print(system(buildout + ' foo:bar=1 -vv'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout + ' foo:bar=1 -vv'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
...
[foo]
@@ -567,7 +568,7 @@
def test_help():
"""
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'), end=' ')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')+' -h'), end=' ')
... # doctest: +ELLIPSIS
Usage: buildout [options] [assignments] [command [command arguments]]
<BLANKLINE>
@@ -576,7 +577,7 @@
-h, --help
...
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')
... +' --help'), end=' ')
... # doctest: +ELLIPSIS
Usage: buildout [options] [assignments] [command [command arguments]]
@@ -603,7 +604,7 @@
... ''')
>>> os.chdir(d)
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')
... + ' bootstrap'), end=' ')
Creating directory '/sample-bootstrap/bin'.
Creating directory '/sample-bootstrap/parts'.
@@ -630,7 +631,7 @@
... ''')
>>> os.chdir(d)
- >>> print(system(os.path.join(sample_buildout, 'bin', 'buildout')
+ >>> prn(system(os.path.join(sample_buildout, 'bin', 'buildout')
... + ' bootstrap'), end=' ')
Creating directory '/sample-bootstrap/bin'.
Creating directory '/sample-bootstrap/parts'.
@@ -638,7 +639,7 @@
Creating directory '/sample-bootstrap/develop-eggs'.
Generated script '/sample-bootstrap/bin/buildout'.
- >>> print(system(os.path.join('bin', 'buildout')), end=' ')
+ >>> prn(system(os.path.join('bin', 'buildout')), end=' ')
Unused options for buildout: 'scripts' 'eggs'.
"""
@@ -662,7 +663,7 @@
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
>>> ls('develop-eggs')
@@ -684,7 +685,7 @@
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
Develop: '/sample-buildout/bar'
@@ -701,7 +702,7 @@
... develop = bar
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/bar'
It is gone
@@ -717,7 +718,7 @@
... [buildout]
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
All gone
@@ -762,7 +763,7 @@
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
Now, if we generate a working set using the egg link, we will get a warning
@@ -781,7 +782,7 @@
... ])]
['foox', 'setuptools']
- >>> print(handler)
+ >>> prn(handler)
zc.buildout.easy_install WARNING
Develop distribution: foox 0.0.0
uses namespace packages but the distribution does not require setuptools.
@@ -812,7 +813,7 @@
... ])]
['foox', 'setuptools']
- >>> print(handler, end=' ')
+ >>> prn(handler, end=' ')
We get the same behavior if the it is a depedency that uses a
namespace package.
@@ -833,7 +834,7 @@
... parts =
... """)
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
Develop: '/sample-buildout/bar'
@@ -845,7 +846,7 @@
... ])]
['bar', 'foox', 'setuptools']
- >>> print(handler, end=' ')
+ >>> prn(handler, end=' ')
zc.buildout.easy_install WARNING
Develop distribution: foox 0.0.0
uses namespace packages but the distribution does not require setuptools.
@@ -921,9 +922,9 @@
... class Install:
... def __init__(*args): pass
... def install(self):
- ... print('installing')
+ ... prn('installing')
... return ()
- ... def uninstall(name, options): print('uninstalling')
+ ... def uninstall(name, options): prn('uninstalling')
... ''')
>>> write('buildout.cfg', '''
@@ -934,7 +935,7 @@
... recipe = recipes:demo
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipes'
Installing demo.
installing
@@ -949,7 +950,7 @@
... x = 1
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling demo.
Running uninstall recipe.
@@ -964,7 +965,7 @@
... parts =
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling demo.
Running uninstall recipe.
@@ -979,7 +980,7 @@
>>> write('demo', 'demo.py',
... """
... def ext(buildout):
- ... print('ext' + " " + list(buildout))
+ ... prn('ext' + " " + list(buildout))
... """)
>>> write('demo', 'setup.py',
@@ -1004,7 +1005,7 @@
... offline = true
... """)
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
ext ['buildout']
@@ -1042,20 +1043,20 @@
... ''')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipe'
Installing foo.
>>> mkdir('recipe', '.svn')
>>> mkdir('recipe', 'CVS')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipe'
Updating foo.
>>> write('recipe', '.svn', 'x', '1')
>>> write('recipe', 'CVS', 'x', '1')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipe'
Updating foo.
@@ -1094,7 +1095,7 @@
... ''')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipe'
Installing foo.
@@ -1111,7 +1112,7 @@
>>> remove('recipe', 'some-file')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')), end=' ')
Develop: '/sample-buildout/recipe'
Updating foo.
@@ -1119,7 +1120,7 @@
def o_option_sets_offline():
"""
- >>> print(system(join(sample_buildout, 'bin', 'buildout')+' -vvo'), end=' ')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')+' -vvo'), end=' ')
... # doctest: +ELLIPSIS
<BLANKLINE>
...
@@ -1140,7 +1141,7 @@
... class Recipe:
... def __init__(*a): pass
... def install(self):
- ... print('recipe v1')
+ ... prn('recipe v1')
... return ()
... update = install
... ''')
@@ -1155,7 +1156,7 @@
>>> write('recipe', 'README', '')
- >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
Running setup script 'recipe/setup.py'.
...
@@ -1173,7 +1174,7 @@
... recipe = recipe
... ''' % join('recipe', 'dist'))
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Getting distribution for 'recipe'.
Got recipe 1.
Installing foo.
@@ -1186,7 +1187,7 @@
... class Recipe:
... def __init__(*a): pass
... def install(self):
- ... print('recipe v2')
+ ... prn('recipe v2')
... return ()
... update = install
... ''')
@@ -1200,25 +1201,25 @@
... ''')
- >>> print(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' setup recipe bdist_egg'), end=' ') # doctest: +ELLIPSIS
Running setup script 'recipe/setup.py'.
...
We won't get the update if we specify -N:
- >>> print(system(buildout+' -N'), end=' ')
+ >>> prn(system(buildout+' -N'), end=' ')
Updating foo.
recipe v1
or if we use -o:
- >>> print(system(buildout+' -o'), end=' ')
+ >>> prn(system(buildout+' -o'), end=' ')
Updating foo.
recipe v1
But we will if we use neither of these:
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Getting distribution for 'recipe'.
Got recipe 2.
Uninstalling foo.
@@ -1237,7 +1238,7 @@
... recipe = recipe ==1
... ''' % join('recipe', 'dist'))
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Uninstalling foo.
Installing foo.
recipe v1
@@ -1286,11 +1287,11 @@
... recipe = recipe
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipe'
Installing foo.
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipe'
Updating foo.
@@ -1322,7 +1323,7 @@
... ['demo==0.2'], dest,
... links=[link_server], index=link_server+'index/')
- >>> print(handler) # doctest: +ELLIPSIS
+ >>> prn(handler) # doctest: +ELLIPSIS
zc.buildout.easy_install DEBUG
Installing 'demo==0.2'.
zc.buildout.easy_install DEBUG
@@ -1368,7 +1369,7 @@
... recipe = recipes:mkdir
... ''')
- >>> print(system(buildout), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout), end=' ') # doctest: +ELLIPSIS
Develop: '/sample-buildout/recipes'
While:
Installing.
@@ -1420,7 +1421,7 @@
... z = 1
... """)
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/.'
Unused options for buildout: 'a'.
Installing foo.
@@ -1488,19 +1489,19 @@
... recipe = recipes:clean
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Installing p1.
Installing p2.
Installing p3.
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Updating p1.
Updating p2.
Installing p3.
- >>> print(system(buildout+' buildout:parts='), end=' ')
+ >>> prn(system(buildout+' buildout:parts='), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling p2.
Uninstalling p1.
@@ -1526,20 +1527,20 @@
... recipe = recipes:clean
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Installing p1.
Installing p2.
Installing p3.
Installing p4.
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Updating p1.
Updating p2.
Updating p3.
- >>> print(system(buildout+' buildout:parts='), end=' ')
+ >>> prn(system(buildout+' buildout:parts='), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling p2.
Uninstalling p1.
@@ -1567,7 +1568,7 @@
... recipe = recipes:clean
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Installing p1.
Installing p2.
@@ -1594,7 +1595,7 @@
... x = 1
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling p4.
Updating p1.
@@ -1618,7 +1619,7 @@
... recipe = recipes:clean
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/recipes'
Uninstalling p1.
Installing p1.
@@ -1651,7 +1652,7 @@
... zip_safe=False)
... ''')
- >>> print(system(buildout+' setup badegg sdist'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' setup badegg sdist'), end=' ') # doctest: +ELLIPSIS
Running setup script 'badegg/setup.py'.
...
@@ -1673,7 +1674,7 @@
... scripts = buildout=bo
... ''' % globals())
- >>> print(system(buildout));print('X') # doctest: +ELLIPSIS
+ >>> prn(system(buildout));prn('X') # doctest: +ELLIPSIS
Installing eggs.
Getting distribution for 'badegg'.
Got badegg 1.
@@ -1735,7 +1736,7 @@
... eggs = demo
... ''' % globals())
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Installing x.
Getting distribution for 'demo'.
Got demo 0.4c1.
@@ -1743,7 +1744,7 @@
Got demoneeded 1.2c1.
Generated script '/sample-buildout/bin/demo'.
- >>> print(system(join('bin', 'demo')), end=' ')
+ >>> prn(system(join('bin', 'demo')), end=' ')
4 2
>>> write('buildout.cfg',
@@ -1757,14 +1758,14 @@
... eggs = demo ==0.1
... ''' % globals())
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Uninstalling x.
Installing x.
Getting distribution for 'demo==0.1'.
Got demo 0.1.
Generated script '/sample-buildout/bin/demo'.
- >>> print(system(join('bin', 'demo')), end=' ')
+ >>> prn(system(join('bin', 'demo')), end=' ')
1 2
"""
@@ -1776,8 +1777,8 @@
... p = subprocess.Popen(s, stdin=subprocess.PIPE,
... stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
... p.stdin.close()
- ... print(p.stdout.read())
- ... print('Exit:', bool(p.wait()))
+ ... prn(p.stdout.read())
+ ... prn('Exit:', bool(p.wait()))
>>> call(buildout)
<BLANKLINE>
@@ -1848,11 +1849,11 @@
... import os
... class Bad:
... def __init__(self, *_):
- ... print(os.getcwd())
+ ... prn(os.getcwd())
... def install(self):
- ... print(os.getcwd())
+ ... prn(os.getcwd())
... os.chdir('bad_start')
- ... print(os.getcwd())
+ ... prn(os.getcwd())
... return ()
... ''')
@@ -1875,7 +1876,7 @@
... ''')
>>> os.chdir('bad_start')
- >>> print(system(join(sample_buildout, 'bin', 'buildout')
+ >>> prn(system(join(sample_buildout, 'bin', 'buildout')
... +' -c '+join(sample_buildout, 'buildout.cfg')), end=' ')
Develop: '/sample-buildout/.'
/sample-buildout
@@ -1905,7 +1906,7 @@
>>> for dist in ws:
- ... print(dist)
+ ... prn(dist)
demo 0.2
demoneeded 1.1
@@ -1918,7 +1919,7 @@
def bug_75607_buildout_should_not_run_if_it_creates_an_empty_buildout_cfg():
"""
>>> remove('buildout.cfg')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
While:
Initializing.
Error: Couldn't open /sample-buildout/buildout.cfg
@@ -1959,7 +1960,7 @@
... eggs = pack0
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/pack0'
Develop: '/sample-buildout/pack1'
Develop: '/sample-buildout/pack2'
@@ -1975,7 +1976,7 @@
However, if we run in verbose mode, we can see why packages were included:
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
We have a develop egg: zc.buildout 1.0.0
We have the best distribution that satisfies 'setuptools'.
@@ -2043,7 +2044,7 @@
... },
... )
... ''')
- >>> print(system(buildout+' setup '+src+' bdist_egg'), end=' ')
+ >>> prn(system(buildout+' setup '+src+' bdist_egg'), end=' ')
... # doctest: +ELLIPSIS
Running setup ...
creating 'dist/wackyextension-1-...
@@ -2067,7 +2068,7 @@
When we run the buildout. it will load the extension from the dist
directory and then use the wacky extension to load the demo package
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Getting distribution for 'wackyextension'.
Got wackyextension 1.
Installing demo.
@@ -2089,7 +2090,7 @@
... setup(name='foo')
... ''')
- >>> print(system(buildout+' setup test bdist_egg'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' setup test bdist_egg'), end=' ') # doctest: +ELLIPSIS
Running setup script 'test/setup.py'.
...
@@ -2150,9 +2151,9 @@
)
if dist.extras:
- print('downloaded', dist.version)
+ prn('downloaded', dist.version)
else:
- print('had', dist.version)
+ prn('had', dist.version)
sys.path_importer_cache.clear()
def prefer_final():
@@ -2269,7 +2270,7 @@
... eggs = demo
... ''' % globals())
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
...
Picked: demo = 0.4c1
@@ -2291,7 +2292,7 @@
... eggs = demo
... ''' % globals())
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
...
Picked: demo = 0.4c1
@@ -2313,7 +2314,7 @@
... eggs = demo
... ''' % globals())
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'setuptools'.
...
Picked: demo = 0.3
@@ -2334,7 +2335,7 @@
... eggs = demo
... ''' % globals())
- >>> print(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
+ >>> prn(system(buildout+' -v'), end=' ') # doctest: +ELLIPSIS
While:
Initializing.
Error: Invalid value for prefer-final option: no
@@ -2364,7 +2365,7 @@
... parts =
... ''')
- >>> print(system(join('bin', 'buildout')), end=' ')
+ >>> prn(system(join('bin', 'buildout')), end=' ')
Develop: '/sample-buildout/foo'
>>> ls('develop-eggs')
@@ -2405,7 +2406,7 @@
... ''' % pkg_resources.working_set.find(
... pkg_resources.Requirement.parse('setuptools')).version)
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Installing foo.
Getting distribution for 'foo==1'.
Got foo 1.
@@ -2433,11 +2434,11 @@
>>> write('t.py',
... '''
... import eggrecipedemo, eggrecipedemoneeded
- ... print(eggrecipedemo.main.func_code.co_filename)
- ... print(eggrecipedemoneeded.f.func_code.co_filename)
+ ... prn(eggrecipedemo.main.func_code.co_filename)
+ ... prn(eggrecipedemoneeded.f.func_code.co_filename)
... ''')
- >>> print(system(join('bin', 'py')+ ' t.py'), end=' ')
+ >>> prn(system(join('bin', 'py')+ ' t.py'), end=' ')
/sample-buildout/eggs/demo-0.4c1-py2.4.egg/eggrecipedemo.py
/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg/eggrecipedemoneeded.py
@@ -2460,7 +2461,7 @@
... eggs-directory = ${buildout:directory}/develop-eggs
... parts =
... ''' % globals())
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
"""
@@ -2491,7 +2492,7 @@
We can see that both eggs were found:
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/sampley'
Develop: '/sample-buildout/samplez'
Installing eggs.
@@ -2523,7 +2524,7 @@
We should get one of the eggs, and a warning for the pattern that
did not match anything.
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Develop: '/sample-buildout/samplea'
Couldn't develop '/sample-buildout/grumble*' (not found)
Installing eggs.
@@ -2578,7 +2579,7 @@
... <= p1
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Installing p1.
foo='1\n2 b'
recipe='zc.buildout:debug'
@@ -2618,7 +2619,7 @@
... x = ${buildout:bar-option} ${buildout:foo-option}
... ''')
- >>> print(system(buildout), end=' ')
+ >>> prn(system(buildout), end=' ')
Installing p.
recipe='zc.buildout:debug'
x='bar\nbaz foo\nham'
@@ -2645,7 +2646,7 @@
... <= p1
... ''')
- >>> print(system(buildout+' buildout:parts+=p2 p1:foo+=bar'), end=' ')
+ >>> prn(system(buildout+' buildout:parts+=p2 p1:foo+=bar'), end=' ')
Installing p1.
foo='1 a\nb\nbar'
recipe='zc.buildout:debug'
@@ -2691,7 +2692,7 @@
tmp, 'eggrecipedemo.py',
'import eggrecipedemoneeded\n'
'x=%s\n'
- 'def main(): print(x + " " + eggrecipedemoneeded.y)\n'
+ 'def main(): prn(x + " " + eggrecipedemoneeded.y)\n'
% i)
c1 = i==4 and 'c1' or ''
write(
@@ -2743,7 +2744,7 @@
from distutils.core import setup, Extension
if os.environ.get('test-variable'):
- print("Have environment test-variable:", os.environ['test-variable'])
+ prn("Have environment test-variable:", os.environ['test-variable'])
setup(name = "extdemo", version = "%s", url="http://www.zope.org",
author="Demo", author_email="demo at demo.com",
More information about the checkins
mailing list