Commit aaa161f4 authored by Jim Fulton's avatar Jim Fulton

Changed the logging format to exclude the logger name for the

zc.buildout logger.  This reduces noise in the output.  This change
was so far reaching, I decided to go ahead and clean up lots of log
messages, adding some missing periods and adding quotes around
requirement strings and file paths.

in easy_install.py, added logging to show why distributions are added
in verbose mode and removed recusive code to show requirement chains
when errors occurred.
parent a3fec817
This diff is collapsed.
This diff is collapsed.
......@@ -57,10 +57,10 @@ And create a buildout that uses it:
If we run the buildout, we'll get an error:
>>> print system(buildout),
buildout: Develop: /sample-buildout/recipes
buildout: Installing data-dir
Develop: '/sample-buildout/recipes'
Installing data-dir.
While:
Installing data-dir
Installing data-dir.
Error: Missing option: data-dir:directory
......@@ -72,10 +72,10 @@ supply some input:
... p self.options.keys()
... q
... """),
buildout: Develop: /sample-buildout/recipes
buildout: Installing data-dir
Develop: '/sample-buildout/recipes'
Installing data-dir.
While:
Installing data-dir
Installing data-dir.
Traceback (most recent call last):
File "/zc/buildout/buildout.py", line 1294, in main
getattr(buildout, command)(args)
......
......@@ -59,12 +59,12 @@ server as usual:
GET 200 /
GET 200 /demo-0.2-py2.4.egg
GET 200 /demoneeded-1.1.zip
buildout: Installing eggs
zc.buildout.easy_install: Getting new distribution for demo==0.2
zc.buildout.easy_install: Got demo 0.2
zc.buildout.easy_install: Getting new distribution for demoneeded
zc.buildout.easy_install: Got demoneeded 1.1
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Installing eggs.
Getting distribution for 'demo==0.2'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
We'll also get the download cache populated. The buildout doesn't put
files in the cache directly. It creates an intermediate directory,
......@@ -87,12 +87,11 @@ If we remove the installed eggs from eggs directory and re-run the buildout:
>>> print system(buildout),
GET 200 /
buildout: Updating eggs
zc.buildout.easy_install: Getting new distribution for demo==0.2
zc.buildout.easy_install: Got demo 0.2
zc.buildout.easy_install: Getting new distribution for demoneeded
zc.buildout.easy_install: Got demoneeded 1.1
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Updating eggs.
Getting distribution for 'demo==0.2'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.1.
We see that the distributions aren't downloaded, because they're
downloaded from the cache.
......@@ -130,10 +129,10 @@ install-from-cache option set to true:
... ''' % globals())
>>> print system(buildout),
buildout: Uninstalling eggs
buildout: Installing eggs
zc.buildout.easy_install: Getting new distribution for demo
zc.buildout.easy_install: Got demo 0.2
zc.buildout.easy_install: Getting new distribution for demoneeded
zc.buildout.easy_install: Got demoneeded 1.1
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Uninstalling eggs.
Installing eggs.
Getting distribution for 'demo'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
This diff is collapsed.
......@@ -228,9 +228,9 @@ we'll get an error:
>>> print handler
zc.buildout.easy_install DEBUG
Installing ['demo >0.2']
Installing 'demo >0.2'.
zc.buildout.easy_install ERROR
The version, 0.2, is not consistent with the requirement, demo>0.2
The version, 0.2, is not consistent with the requirement, 'demo>0.2'.
>>> handler.clear()
......@@ -243,19 +243,19 @@ reporting that a version was picked automatically:
>>> print handler
zc.buildout.easy_install DEBUG
Installing ['demo']
Installing 'demo'.
zc.buildout.easy_install DEBUG
We have the best distribution that satisfies
demo
zc.buildout.easy_install.picked DEBUG
demo = 0.3
We have the best distribution that satisfies 'demo'.
zc.buildout.easy_install DEBUG
Getting required demoneeded
Picked: demo = 0.3
zc.buildout.easy_install DEBUG
We have the best distribution that satisfies
demoneeded
zc.buildout.easy_install.picked DEBUG
demoneeded = 1.1
Getting required 'demoneeded'
zc.buildout.easy_install DEBUG
required by demo 0.3.
zc.buildout.easy_install DEBUG
We have the best distribution that satisfies 'demoneeded'.
zc.buildout.easy_install DEBUG
Picked: demoneeded = 1.1
>>> handler.uninstall()
>>> logging.getLogger('zc.buildout.easy_install').propagate = True
......
......@@ -40,7 +40,7 @@ To see how this works, we'll create two versions of a recipe egg:
>>> write('recipe', 'README', '')
>>> print system(buildout+' setup recipe bdist_egg'), # doctest: +ELLIPSIS
buildout: Running setup script recipe/setup.py
Running setup script 'recipe/setup.py'.
...
>>> rmdir('recipe', 'build')
......@@ -65,7 +65,7 @@ To see how this works, we'll create two versions of a recipe egg:
>>> print system(buildout+' setup recipe bdist_egg'), # doctest: +ELLIPSIS
buildout: Running setup script recipe/setup.py
Running setup script 'recipe/setup.py'.
...
and we'll configure a buildout to use it:
......@@ -83,9 +83,9 @@ and we'll configure a buildout to use it:
If we run the buildout, it will use version 2:
>>> print system(buildout),
zc.buildout.easy_install: Getting new distribution for spam
zc.buildout.easy_install: Got spam 2
buildout: Installing foo
Getting distribution for 'spam'.
Got spam 2.
Installing foo.
recipe v2
We can specify a versions section that lists our recipe and name it in
......@@ -113,10 +113,10 @@ as in the versions option.
Now, if we run the buildout, we'll use version 1 of the spam recipe:
>>> print system(buildout),
zc.buildout.easy_install: Getting new distribution for spam==1
zc.buildout.easy_install: Got spam 1
buildout: Uninstalling foo
buildout: Installing foo
Getting distribution for 'spam==1'.
Got spam 1.
Uninstalling foo.
Installing foo.
recipe v1
Running the buildout in verbose mode will help us get information
......@@ -124,18 +124,15 @@ about versions used. If we run the buildout in verbose mode without
specifying a versions section:
>>> print system(buildout+' buildout:versions= -v'), # doctest: +ELLIPSIS
zc.buildout.easy_install: Installing ['zc.buildout', 'setuptools']
zc.buildout.easy_install: We have a develop egg for zc.buildout
zc.buildout.easy_install: We have the best distribution that satisfies
setuptools
zc.buildout.easy_install.picked: setuptools = 0.6
zc.buildout.easy_install: Installing ['spam']
zc.buildout.easy_install: We have the best distribution that satisfies
spam
zc.buildout.easy_install.picked: spam = 2
...
buildout: Uninstalling foo
buildout: Installing foo
Installing 'zc.buildout', 'setuptools'.
We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6
Installing 'spam'.
We have the best distribution that satisfies 'spam'.
Picked: spam = 2.
Uninstalling foo.
Installing foo.
recipe v2
We'll get output that includes lines that tell us what versions
......@@ -149,17 +146,14 @@ that we can fix them in a versions section.
If we run the buildout with the versions section:
>>> print system(buildout+' -v'), # doctest: +ELLIPSIS
zc.buildout.easy_install: Installing ['zc.buildout', 'setuptools']
zc.buildout.easy_install: We have a develop egg for zc.buildout
zc.buildout.easy_install: We have the best distribution that satisfies
setuptools
zc.buildout.easy_install.picked: setuptools = 0.6
zc.buildout.easy_install: Installing ['spam']
zc.buildout.easy_install: We have the best distribution that satisfies
spam==1
...
buildout: Uninstalling foo
buildout: Installing foo
Installing 'zc.buildout', 'setuptools'.
We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6
Installing 'spam'.
We have the best distribution that satisfies 'spam==1'.
Uninstalling foo.
Installing foo.
recipe v1
We won't get output for the spam distribution, which we didn't pick,
......
......@@ -33,7 +33,7 @@ To illustrate this, we'll create a package in a sample buildout:
We can use the buildout command to generate the hello egg:
>>> print system(buildout +' setup hello -q bdist_egg'),
buildout: Running setup script hello/setup.py
Running setup script 'hello/setup.py'.
zip_safe flag not set; analyzing archive contents...
The hello directory now has a hello egg in it's dist directory:
......
This diff is collapsed.
......@@ -64,17 +64,17 @@ Now if we run the buildout, the buildout will upgrade itself to the
new versions found in new releases:
>>> print system(buildout),
zc.buildout.easy_install: Getting new distribution for zc.buildout
zc.buildout.easy_install: Got zc.buildout 99.99
zc.buildout.easy_install: Getting new distribution for setuptools
zc.buildout.easy_install: Got setuptools 99.99
buildout: Upgraded:
Getting distribution for 'zc.buildout'.
Got zc.buildout 99.99.
Getting distribution for 'setuptools'.
Got setuptools 99.99.
Upgraded:
zc.buildout version 99.99,
setuptools version 99.99;
restarting.
zc.buildout.easy_install: Generated script /sample-buildout/bin/buildout.
buildout: Develop: /sample-buildout/showversions
buildout: Installing show-versions
Generated script '/sample-buildout/bin/buildout'.
Develop: '/sample-buildout/showversions'
Installing show-versions.
zc.buildout 99.99
setuptools 99.99
......@@ -117,13 +117,13 @@ version:
We'll actually "upgrade" to an earlier version.
>>> print system(buildout),
buildout: Upgraded:
Upgraded:
zc.buildout version 1.0.0,
setuptools version 0.6;
restarting.
zc.buildout.easy_install: Generated script /sample-buildout/bin/buildout.
buildout: Develop: /sample-buildout/showversions
buildout: Updating show-versions
Generated script '/sample-buildout/bin/buildout'.
Develop: '/sample-buildout/showversions'
Updating show-versions.
zc.buildout 1.0.0
setuptools 0.6
......@@ -142,16 +142,16 @@ We won't upgrade in offline mode:
... """ % dict(new_releases=new_releases))
>>> print system(buildout+' -o'),
buildout: Develop: /sample-buildout/showversions
buildout: Updating show-versions
Develop: '/sample-buildout/showversions'
Updating show-versions.
zc.buildout 1.0.0
setuptools 0.6
Or in non-newest mode:
>>> print system(buildout+' -N'),
buildout: Develop: /sample-buildout/showversions
buildout: Updating show-versions
Develop: '/sample-buildout/showversions'
Updating show-versions.
zc.buildout 1.0.0
setuptools 0.6
......@@ -170,14 +170,14 @@ directory:
>>> cd(sample_buildout2)
>>> print system(buildout),
buildout: Creating directory /sample_buildout2/bin
buildout: Creating directory /sample_buildout2/parts
buildout: Creating directory /sample_buildout2/eggs
buildout: Creating directory /sample_buildout2/develop-eggs
zc.buildout.easy_install: Getting new distribution for zc.buildout
zc.buildout.easy_install: Got zc.buildout 99.99
zc.buildout.easy_install: Getting new distribution for setuptools
zc.buildout.easy_install: Got setuptools 99.99
buildout: Not upgrading because not running a local buildout command
Creating directory '/sample_buildout2/bin'.
Creating directory '/sample_buildout2/parts'.
Creating directory '/sample_buildout2/eggs'.
Creating directory '/sample_buildout2/develop-eggs'.
Getting distribution for 'zc.buildout'.
Got zc.buildout 99.99.
Getting distribution for 'setuptools'.
Got setuptools 99.99.
Not upgrading because not running a local buildout command.
>>> ls('bin')
......@@ -65,11 +65,11 @@ Let's run the buildout:
>>> import os
>>> print system(buildout),
buildout: Installing demo
zc.buildout.easy_install: Getting new distribution for demo<0.3
zc.buildout.easy_install: Got demo 0.2
zc.buildout.easy_install: Getting new distribution for demoneeded
zc.buildout.easy_install: Got demoneeded 1.1
Installing demo.
Getting distribution for 'demo<0.3'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.1.
Now, if we look at the buildout eggs directory:
......@@ -109,9 +109,9 @@ scripts recipe:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
Now we also see the script defined by the dmo script:
......@@ -171,10 +171,10 @@ specification. We were able to do this because the scripts recipe if
the default entry point for the zc.recipe.egg egg.
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
zc.buildout.easy_install: Generated interpreter /sample-buildout/bin/py-demo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
Generated interpreter '/sample-buildout/bin/py-demo'.
Now we also get a py-demo script for giving us a Python prompt with
the path for demo and any eggs it depends on included in sys.path.
......@@ -229,9 +229,9 @@ remove the restriction on demo:
and run the buildout in non-newest mode:
>>> print system(buildout+' -N'),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
Note that we removed the eggs option, and the eggs defaulted to the
part name. Because we removed the eggs option, the demo was
......@@ -240,8 +240,7 @@ reinstalled.
We'll also run the buildout in off-line mode:
>>> print system(buildout+' -o'),
buildout: Updating demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Updating demo.
We didn't get an update for demo:
......@@ -255,10 +254,10 @@ If we run the buildout on the default online and newest modes,
we'll get an update for demo:
>>> print system(buildout),
buildout: Updating demo
zc.buildout.easy_install: Getting new distribution for demo
zc.buildout.easy_install: Got demo 0.3
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Updating demo.
Getting distribution for 'demo'.
Got demo 0.3.
Generated script '/sample-buildout/bin/demo'.
Then we'll get a new demo egg:
......@@ -295,8 +294,8 @@ arguments:
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
Uninstalling demo.
Installing demo.
>>> ls(sample_buildout, 'bin')
- buildout
......@@ -316,9 +315,9 @@ You can also control the name used for scripts:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/foo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/foo'.
>>> ls(sample_buildout, 'bin')
- buildout
......@@ -346,9 +345,9 @@ extra-paths option:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/foo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/foo'.
Let's look at the script that was generated:
......@@ -395,9 +394,9 @@ to be included in generated scripts:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/foo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/foo'.
>>> cat(sample_buildout, 'bin', 'foo') # doctest: +NORMALIZE_WHITESPACE
#!/usr/local/bin/python2.4
......@@ -445,11 +444,11 @@ declare entry points using the entry-points option:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
zc.buildout.easy_install: Generated script /sample-buildout/bin/alt.
zc.buildout.easy_install: Generated script /sample-buildout/bin/other.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
Generated script '/sample-buildout/bin/alt'.
Generated script '/sample-buildout/bin/other'.
>>> ls(sample_buildout, 'bin')
- alt
......@@ -492,6 +491,6 @@ be made to contact an index server:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Uninstalling demo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/foo.
Uninstalling demo.
Installing demo.
Generated script '/sample-buildout/bin/foo'.
......@@ -133,7 +133,7 @@ the egg:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Installing extdemo
Installing extdemo.
zip_safe flag not set; analyzing archive contents...
We got the zip_safe warning because the source distribution we used
......@@ -189,10 +189,10 @@ Let's define a script that uses out ext demo:
... """ % dict(server=link_server))
>>> print system(buildout),
buildout: Develop: /sample-buildout/demo
buildout: Updating extdemo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Develop: '/sample-buildout/demo'
Updating extdemo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
When we run the script, we'll 42 printed:
......@@ -212,16 +212,14 @@ distribution for extdemo:
If we run the buildout in non-newest or offline modes:
>>> print system(buildout+' -N'),
buildout: Develop: /sample-buildout/demo
buildout: Updating extdemo
buildout: Updating demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Develop: '/sample-buildout/demo'
Updating extdemo.
Updating demo.
>>> print system(buildout+' -o'),
buildout: Develop: /sample-buildout/demo
buildout: Updating extdemo
buildout: Updating demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Develop: '/sample-buildout/demo'
Updating extdemo.
Updating demo.
We won't get an update.
......@@ -234,11 +232,11 @@ But if we run the buildout in the default on-line and newest modes, we
will:
>>> print system(buildout),
buildout: Develop: /sample-buildout/demo
buildout: Updating extdemo
Develop: '/sample-buildout/demo'
Updating extdemo.
zip_safe flag not set; analyzing archive contents...
buildout: Updating demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Updating demo.
Generated script '/sample-buildout/bin/demo'.
>>> ls(sample_buildout, 'develop-eggs')
- demo.egg-link
......@@ -272,13 +270,13 @@ We can specify a specific version using the egg option:
... """ % dict(server=link_server))
>>> print system(buildout+' -D'),
buildout: Develop: /sample-buildout/demo
buildout: Uninstalling demo
buildout: Uninstalling extdemo
buildout: Installing extdemo
Develop: '/sample-buildout/demo'
Uninstalling demo.
Uninstalling extdemo.
Installing extdemo.
zip_safe flag not set; analyzing archive contents...
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
>>> ls(sample_buildout, 'develop-eggs')
- demo.egg-link
......@@ -383,12 +381,12 @@ TWO to be defined. This will cause the module-variable, 'val', to be
set with a value of 2.
>>> print system(buildout),
buildout: Develop: /sample-buildout/demo
buildout: Uninstalling demo
buildout: Uninstalling extdemo
buildout: Installing extdemo
buildout: Installing demo
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
Develop: '/sample-buildout/demo'
Uninstalling demo.
Uninstalling extdemo.
Installing extdemo.
Installing demo.
Generated script '/sample-buildout/bin/demo'.
Our develop-eggs now includes an egg link for extdemo:
......
......@@ -48,15 +48,15 @@ Now, if we run the buildout:
>>> os.chdir(sample_buildout)
>>> buildout = os.path.join(sample_buildout, 'bin', 'buildout')
>>> print system(buildout),
buildout: Installing demo
zc.buildout.easy_install: Getting new distribution for demo<0.3
zc.buildout.easy_install: Got demo 0.2
zc.buildout.easy_install: Getting new distribution for demoneeded
zc.buildout.easy_install: Getting new distribution for setuptools
zc.buildout.easy_install: Got setuptools 0.6
zc.buildout.easy_install: Got demoneeded 1.1
zc.buildout.easy_install: Generated script /sample-buildout/bin/demo.
zc.buildout.easy_install: Generated interpreter /sample-buildout/bin/py-demo.
Installing demo.
Getting distribution for 'demo<0.3'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Getting distribution for 'setuptools'.
Got setuptools 0.6.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
Generated interpreter '/sample-buildout/bin/py-demo'.
we'll get the Python 2.3 eggs for demo and demoneeded:
......
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