Commit 18964211 authored by Jason Madden's avatar Jason Madden Committed by Jim Fulton

Update tests to work with setuptools 36. Fixes #398 (#400)

parent 5e7d5f45
...@@ -34,7 +34,7 @@ Buildout work better: ...@@ -34,7 +34,7 @@ Buildout work better:
>>> [abieggs] = ls(join('home', '.buildout', 'eggs')) >>> [abieggs] = ls(join('home', '.buildout', 'eggs'))
>>> eqs([n.split('-', 1)[0] >>> eqs([n.split('-', 1)[0]
... for n in ls('home', '.buildout', 'eggs', abieggs)], ... for n in ls('home', '.buildout', 'eggs', abieggs)],
... 'bobo', 'WebOb') ... 'bobo', 'WebOb', 'six')
You might be wondering why these settings aren't the default, if You might be wondering why these settings aren't the default, if
they're recommended for everyone. They probably *should* be the they're recommended for everyone. They probably *should* be the
......
...@@ -256,7 +256,7 @@ is typically used to set up a shared egg or cache directory, as in: ...@@ -256,7 +256,7 @@ is typically used to set up a shared egg or cache directory, as in:
>>> [abieggs] = ls(join('home', '.buildout', 'eggs')) >>> [abieggs] = ls(join('home', '.buildout', 'eggs'))
>>> eqs([n.split('-', 1)[0] >>> eqs([n.split('-', 1)[0]
... for n in ls('home', '.buildout', 'eggs', abieggs)], ... for n in ls('home', '.buildout', 'eggs', abieggs)],
... 'bobo', 'WebOb') ... 'bobo', 'WebOb', 'six')
>>> clear_here() >>> clear_here()
......
...@@ -55,9 +55,7 @@ The ``bin`` directory contains scripts:: ...@@ -55,9 +55,7 @@ The ``bin`` directory contains scripts::
The ``eggs`` directory has installed distributions: The ``eggs`` directory has installed distributions:
>>> ls(sample_buildout, 'eggs') >>> ls(sample_buildout, 'eggs')
d...
- setuptools-0.7-py3.3.egg - setuptools-0.7-py3.3.egg
...
- zc.buildout.egg-link - zc.buildout.egg-link
The ``develop-eggs`` and ``parts`` directories are initially empty:: The ``develop-eggs`` and ``parts`` directories are initially empty::
...@@ -368,7 +366,7 @@ Error reporting ...@@ -368,7 +366,7 @@ Error reporting
If a user makes an error the error needs to be reported, and work needs If a user makes an error the error needs to be reported, and work needs
to stop. This is accomplished by logging a detailed error message and to stop. This is accomplished by logging a detailed error message and
then raising a then raising a
``zc.buildout.UserError`` exception (or a subclass of this exception). ``zc.buildout.UserError`` exception (or a subclass of this exception).
Raising an error other than a Raising an error other than a
``UserError`` still displays the error, but labels it as a bug in the ``UserError`` still displays the error, but labels it as a bug in the
...@@ -864,7 +862,7 @@ the origin of the value (file name or ``COMPUTED_VALUE``, ``DEFAULT_VALUE``, ...@@ -864,7 +862,7 @@ the origin of the value (file name or ``COMPUTED_VALUE``, ``DEFAULT_VALUE``,
DEFAULT_VALUE DEFAULT_VALUE
<BLANKLINE> <BLANKLINE>
The ``annotate`` command is sensitive to the verbosity flag. The ``annotate`` command is sensitive to the verbosity flag.
You get more information about the way values are computed:: You get more information about the way values are computed::
>>> print_(system(buildout+ ' -v annotate'), end='') >>> print_(system(buildout+ ' -v annotate'), end='')
...@@ -2772,7 +2770,7 @@ database is shown:: ...@@ -2772,7 +2770,7 @@ database is shown::
We have a develop egg: zc.buildout 1.0.0. We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.7 Picked: setuptools = 0.7
... <BLANKLINE>
Configuration data: Configuration data:
[buildout] [buildout]
allow-hosts = * allow-hosts = *
...@@ -2870,8 +2868,8 @@ already, but let's review them and touch on some we haven't discussed: ...@@ -2870,8 +2868,8 @@ already, but let's review them and touch on some we haven't discussed:
This can be a relative path, which is This can be a relative path, which is
interpreted relative to the directory option. interpreted relative to the directory option.
.. warning:: .. warning::
Eggs in this directory should *never* be modified. Eggs in this directory should *never* be modified.
``find-links`` ``find-links``
...@@ -2941,7 +2939,7 @@ already, but let's review them and touch on some we haven't discussed: ...@@ -2941,7 +2939,7 @@ already, but let's review them and touch on some we haven't discussed:
command-line option. See also the ``offline`` option. command-line option. See also the ``offline`` option.
``offline`` ``offline``
The ``offline`` option goes a bit further than the ``newest`` option. The ``offline`` option goes a bit further than the ``newest`` option.
If the If the
buildout ``offline`` option is given a value of ``true``, the buildout and buildout ``offline`` option is given a value of ``true``, the buildout and
recipes that are aware of the option will avoid doing network access. recipes that are aware of the option will avoid doing network access.
...@@ -2960,7 +2958,7 @@ already, but let's review them and touch on some we haven't discussed: ...@@ -2960,7 +2958,7 @@ already, but let's review them and touch on some we haven't discussed:
Currently, when searching for new releases, the newest available Currently, when searching for new releases, the newest available
release is used. This isn't usually ideal, as you may get a release is used. This isn't usually ideal, as you may get a
development release or alpha releases not ready to be widely used. development release or alpha releases not ready to be widely used.
You can request that final releases be preferred using the You can request that final releases be preferred using the
``prefer-final`` option in the ``buildout`` section:: ``prefer-final`` option in the ``buildout`` section::
[buildout] [buildout]
...@@ -3037,9 +3035,7 @@ We also get other buildout artifacts:: ...@@ -3037,9 +3035,7 @@ We also get other buildout artifacts::
>>> _ = (ls(sample_bootstrapped, 'eggs'), >>> _ = (ls(sample_bootstrapped, 'eggs'),
... ls(sample_bootstrapped, 'develop-eggs')) ... ls(sample_bootstrapped, 'develop-eggs'))
d...
- setuptools-0.7-py2.3.egg - setuptools-0.7-py2.3.egg
...
- zc.buildout-1.0-py2.3.egg - zc.buildout-1.0-py2.3.egg
(We list both the ``eggs`` and ``develop-eggs`` directories because the (We list both the ``eggs`` and ``develop-eggs`` directories because the
......
...@@ -131,7 +131,6 @@ specifying a versions section: ...@@ -131,7 +131,6 @@ specifying a versions section:
We have a develop egg: zc.buildout 1.0.0. We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6 Picked: setuptools = 0.6
...
Installing 'spam'. Installing 'spam'.
We have the best distribution that satisfies 'spam'. We have the best distribution that satisfies 'spam'.
Picked: spam = 2. Picked: spam = 2.
...@@ -154,7 +153,6 @@ If we run the buildout with the versions section: ...@@ -154,7 +153,6 @@ If we run the buildout with the versions section:
We have a develop egg: zc.buildout 1.0.0. We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6 Picked: setuptools = 0.6
...
Installing 'spam'. Installing 'spam'.
We have the distribution that satisfies 'spam==1'. We have the distribution that satisfies 'spam==1'.
Uninstalling foo. Uninstalling foo.
...@@ -186,7 +184,6 @@ versions for. ...@@ -186,7 +184,6 @@ versions for.
We have a develop egg: zc.buildout 1.0.0. We have a develop egg: zc.buildout 1.0.0.
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.6 Picked: setuptools = 0.6
...
Installing 'spam >0'. Installing 'spam >0'.
We have the distribution that satisfies 'spam==1'. We have the distribution that satisfies 'spam==1'.
Uninstalling foo. Uninstalling foo.
...@@ -296,11 +293,8 @@ versions it picked at the end of its run: ...@@ -296,11 +293,8 @@ versions it picked at the end of its run:
Versions had to be automatically picked. Versions had to be automatically picked.
The following part definition lists the versions picked: The following part definition lists the versions picked:
[versions] [versions]
...
setuptools = 0.6.99 setuptools = 0.6.99
...
spam = 2 spam = 2
...
When everything is pinned, no output is generated: When everything is pinned, no output is generated:
...@@ -321,7 +315,6 @@ When everything is pinned, no output is generated: ...@@ -321,7 +315,6 @@ When everything is pinned, no output is generated:
>>> print_(system(buildout), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Updating foo. Updating foo.
recipe v2 recipe v2
...
The Python package index is case-insensitive. Both The Python package index is case-insensitive. Both
http://pypi.python.org/simple/Django/ and http://pypi.python.org/simple/Django/ and
...@@ -346,7 +339,6 @@ and case differences won't impact the pinning: ...@@ -346,7 +339,6 @@ and case differences won't impact the pinning:
>>> print_(system(buildout), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Updating foo. Updating foo.
recipe v2 recipe v2
...
Sometimes it is handy to have a separate file with versions. This is a regular Sometimes it is handy to have a separate file with versions. This is a regular
buildout file with a single ``[versions]`` section. You include it by buildout file with a single ``[versions]`` section. You include it by
...@@ -372,7 +364,6 @@ extending from that versions file: ...@@ -372,7 +364,6 @@ extending from that versions file:
>>> print_(system(buildout), end='') # doctest: +ELLIPSIS >>> print_(system(buildout), end='') # doctest: +ELLIPSIS
Updating foo. Updating foo.
recipe v2 recipe v2
...
If not everything is pinned and buildout has to pick versions, you can tell If not everything is pinned and buildout has to pick versions, you can tell
buildout to append the versions to your versions file. It simply appends them buildout to append the versions to your versions file. It simply appends them
...@@ -401,9 +392,7 @@ at the end. ...@@ -401,9 +392,7 @@ at the end.
Versions had to be automatically picked. Versions had to be automatically picked.
The following part definition lists the versions picked: The following part definition lists the versions picked:
[versions] [versions]
...
spam = 2 spam = 2
...
Picked versions have been written to my_versions.cfg Picked versions have been written to my_versions.cfg
The versions file now contains the extra pin: The versions file now contains the extra pin:
...@@ -411,12 +400,9 @@ The versions file now contains the extra pin: ...@@ -411,12 +400,9 @@ The versions file now contains the extra pin:
>>> print_(open('my_versions.cfg').read()) # doctest: +ELLIPSIS >>> print_(open('my_versions.cfg').read()) # doctest: +ELLIPSIS
<BLANKLINE> <BLANKLINE>
... ...
<BLANKLINE>
# Added by buildout at YYYY-MM-DD hh:mm:ss.dddddd # Added by buildout at YYYY-MM-DD hh:mm:ss.dddddd
...
spam = 2 spam = 2
<BLANKLINE> <BLANKLINE>
...
And re-running buildout doesn't report any picked versions anymore: And re-running buildout doesn't report any picked versions anymore:
...@@ -453,13 +439,12 @@ The versions file contains the extra pin: ...@@ -453,13 +439,12 @@ The versions file contains the extra pin:
>>> print_(open('my_versions.cfg').read()) # doctest: +ELLIPSIS >>> print_(open('my_versions.cfg').read()) # doctest: +ELLIPSIS
<BLANKLINE> <BLANKLINE>
[versions]
... ...
<BLANKLINE> <BLANKLINE>
# Added by buildout at YYYY-MM-DD hh:mm:ss.dddddd # Added by buildout at YYYY-MM-DD hh:mm:ss.dddddd
...
spam = 2 spam = 2
<BLANKLINE> <BLANKLINE>
...
Because buildout now includes buildout-versions' (and part of the older Because buildout now includes buildout-versions' (and part of the older
buildout.dumppickedversions') functionality, it warns if these extensions are buildout.dumppickedversions') functionality, it warns if these extensions are
......
...@@ -341,12 +341,12 @@ If we use the verbose switch, we can see where requirements are coming from: ...@@ -341,12 +341,12 @@ If we use the verbose switch, we can see where requirements are coming from:
We have a develop egg: zc.buildout 1.0.0 We have a develop egg: zc.buildout 1.0.0
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.7 Picked: setuptools = 0.7
...
Develop: '/sample-buildout/sampley' Develop: '/sample-buildout/sampley'
Develop: '/sample-buildout/samplez' Develop: '/sample-buildout/samplez'
Develop: '/sample-buildout/samplea' Develop: '/sample-buildout/samplea'
Develop: '/sample-buildout/sampleb' Develop: '/sample-buildout/sampleb'
...Installing eggs. ...
Installing eggs.
Installing 'samplea', 'samplez'. Installing 'samplea', 'samplez'.
We have a develop egg: samplea 1 We have a develop egg: samplea 1
We have a develop egg: samplez 1 We have a develop egg: samplez 1
...@@ -465,7 +465,6 @@ We do not need to run in verbose mode for that to work: ...@@ -465,7 +465,6 @@ We do not need to run in verbose mode for that to work:
Versions had to be automatically picked. Versions had to be automatically picked.
The following part definition lists the versions picked: The following part definition lists the versions picked:
[versions] [versions]
...
<BLANKLINE> <BLANKLINE>
# Required by: # Required by:
# sampley==1 # sampley==1
...@@ -866,9 +865,7 @@ On the other hand, if we have a zipped egg, rather than a develop egg: ...@@ -866,9 +865,7 @@ On the other hand, if we have a zipped egg, rather than a develop egg:
- zc.recipe.egg.egg-link - zc.recipe.egg.egg-link
>>> ls('eggs') # doctest: +ELLIPSIS >>> ls('eggs') # doctest: +ELLIPSIS
d...
- foox-0.0.0-py2.4.egg - foox-0.0.0-py2.4.egg
...
d setuptools.eggpyN.N.egg d setuptools.eggpyN.N.egg
... ...
...@@ -1799,7 +1796,6 @@ def install_source_dist_with_bad_py(): ...@@ -1799,7 +1796,6 @@ def install_source_dist_with_bad_py():
... ...
>>> ls('eggs') # doctest: +ELLIPSIS >>> ls('eggs') # doctest: +ELLIPSIS
d...
d badegg-1-py2.4.egg d badegg-1-py2.4.egg
... ...
...@@ -2095,13 +2091,13 @@ def dealing_with_extremely_insane_dependencies(): ...@@ -2095,13 +2091,13 @@ def dealing_with_extremely_insane_dependencies():
We have a develop egg: zc.buildout 1.0.0 We have a develop egg: zc.buildout 1.0.0
We have the best distribution that satisfies 'setuptools'. We have the best distribution that satisfies 'setuptools'.
Picked: setuptools = 0.7 Picked: setuptools = 0.7
...
Develop: '/sample-buildout/pack0' Develop: '/sample-buildout/pack0'
Develop: '/sample-buildout/pack1' Develop: '/sample-buildout/pack1'
Develop: '/sample-buildout/pack2' Develop: '/sample-buildout/pack2'
Develop: '/sample-buildout/pack3' Develop: '/sample-buildout/pack3'
Develop: '/sample-buildout/pack4' Develop: '/sample-buildout/pack4'
...Installing pack1. ...
Installing pack1.
Installing 'pack0'. Installing 'pack0'.
We have a develop egg: pack0 0.0.0 We have a develop egg: pack0 0.0.0
Getting required 'pack4' Getting required 'pack4'
...@@ -2989,7 +2985,6 @@ def bootstrap_honors_relative_paths(): ...@@ -2989,7 +2985,6 @@ def bootstrap_honors_relative_paths():
sys.path[0:0] = [ sys.path[0:0] = [
... ...
join(base, 'eggs/setuptools-0.7-py2.7.egg'), join(base, 'eggs/setuptools-0.7-py2.7.egg'),
...
] ]
<BLANKLINE> <BLANKLINE>
import zc.buildout.buildout import zc.buildout.buildout
...@@ -3105,9 +3100,7 @@ def test_abi_tag_eggs(): ...@@ -3105,9 +3100,7 @@ def test_abi_tag_eggs():
d parts d parts
>>> from zc.buildout.pep425tags import get_abi_tag >>> from zc.buildout.pep425tags import get_abi_tag
>>> ls(join('eggs', get_abi_tag())) # doctest: +ELLIPSIS >>> ls(join('eggs', get_abi_tag())) # doctest: +ELLIPSIS
d...
d setuptools-34.0.3-py3.5.egg d setuptools-34.0.3-py3.5.egg
...
""" """
def test_buildout_doesnt_keep_adding_itself_to_versions(): def test_buildout_doesnt_keep_adding_itself_to_versions():
...@@ -3138,7 +3131,6 @@ def test_buildout_doesnt_keep_adding_itself_to_versions(): ...@@ -3138,7 +3131,6 @@ def test_buildout_doesnt_keep_adding_itself_to_versions():
<BLANKLINE> <BLANKLINE>
# Added by buildout... # Added by buildout...
setuptools = 34.0.3 setuptools = 34.0.3
...
>>> _ = system(join('bin', 'buildout')) >>> _ = system(join('bin', 'buildout'))
>>> _ = system(join('bin', 'buildout')) >>> _ = system(join('bin', 'buildout'))
......
...@@ -7,10 +7,8 @@ demonstrate this, we've created some "new releases" of buildout and ...@@ -7,10 +7,8 @@ demonstrate this, we've created some "new releases" of buildout and
setuptools in a new_releases folder: setuptools in a new_releases folder:
>>> ls(new_releases) >>> ls(new_releases)
d...
d setuptools d setuptools
- setuptools-99.99-py2.4.egg - setuptools-99.99-py2.4.egg
...
d zc.buildout d zc.buildout
- zc.buildout-99.99-py2.4.egg - zc.buildout-99.99-py2.4.egg
...@@ -72,7 +70,6 @@ new versions found in new releases: ...@@ -72,7 +70,6 @@ new versions found in new releases:
Got zc.buildout 99.99. Got zc.buildout 99.99.
Getting distribution for 'setuptools'. Getting distribution for 'setuptools'.
Got setuptools 99.99. Got setuptools 99.99.
...
Upgraded: Upgraded:
zc.buildout version 99.99, zc.buildout version 99.99,
setuptools version 99.99; setuptools version 99.99;
...@@ -92,7 +89,6 @@ Our buildout script has been updated to use the new eggs: ...@@ -92,7 +89,6 @@ Our buildout script has been updated to use the new eggs:
sys.path[0:0] = [ sys.path[0:0] = [
'/sample-buildout/eggs/zc.buildout-99.99-py2.4.egg', '/sample-buildout/eggs/zc.buildout-99.99-py2.4.egg',
'/sample-buildout/eggs/setuptools-99.99-py2.4.egg', '/sample-buildout/eggs/setuptools-99.99-py2.4.egg',
...
] ]
<BLANKLINE> <BLANKLINE>
import zc.buildout.buildout import zc.buildout.buildout
...@@ -232,7 +228,6 @@ directory: ...@@ -232,7 +228,6 @@ directory:
sys.path[0:0] = [ sys.path[0:0] = [
join(base, 'eggs/zc.buildout-99.99-py3.3.egg'), join(base, 'eggs/zc.buildout-99.99-py3.3.egg'),
join(base, 'eggs/setuptools-99.99-py3.3.egg'), join(base, 'eggs/setuptools-99.99-py3.3.egg'),
...
] ]
<BLANKLINE> <BLANKLINE>
import zc.buildout.buildout import zc.buildout.buildout
......
...@@ -72,12 +72,9 @@ Let's run the buildout: ...@@ -72,12 +72,9 @@ Let's run the buildout:
Now, if we look at the buildout eggs directory: Now, if we look at the buildout eggs directory:
>>> ls(sample_buildout, 'eggs') >>> ls(sample_buildout, 'eggs')
d...
d demo-0.2-py2.3.egg d demo-0.2-py2.3.egg
d demoneeded-1.1-py2.3.egg d demoneeded-1.1-py2.3.egg
...
- setuptools-0.7-py2.3.egg - setuptools-0.7-py2.3.egg
...
d zc.buildout-1.0-py2.3.egg d zc.buildout-1.0-py2.3.egg
We see that we got an egg for demo that met the requirement, as well We see that we got an egg for demo that met the requirement, as well
...@@ -264,12 +261,9 @@ We'll also run the buildout in off-line mode: ...@@ -264,12 +261,9 @@ We'll also run the buildout in off-line mode:
We didn't get an update for demo: We didn't get an update for demo:
>>> ls(sample_buildout, 'eggs') >>> ls(sample_buildout, 'eggs')
d...
d demo-0.2-py2.3.egg d demo-0.2-py2.3.egg
d demoneeded-1.1-py2.3.egg d demoneeded-1.1-py2.3.egg
...
- setuptools-0.7-py2.3.egg - setuptools-0.7-py2.3.egg
...
d zc.buildout-1.0-py2.3.egg d zc.buildout-1.0-py2.3.egg
If we run the buildout on the default online and newest modes, If we run the buildout on the default online and newest modes,
...@@ -284,13 +278,10 @@ we'll get an update for demo: ...@@ -284,13 +278,10 @@ we'll get an update for demo:
Then we'll get a new demo egg: Then we'll get a new demo egg:
>>> ls(sample_buildout, 'eggs') >>> ls(sample_buildout, 'eggs')
d...
d demo-0.2-py2.3.egg d demo-0.2-py2.3.egg
d demo-0.3-py2.3.egg d demo-0.3-py2.3.egg
d demoneeded-1.1-py2.3.egg d demoneeded-1.1-py2.3.egg
...
- setuptools-0.7-py2.4.egg - setuptools-0.7-py2.4.egg
...
d zc.buildout-1.0-py2.4.egg d zc.buildout-1.0-py2.4.egg
The script is updated too: The script is updated too:
......
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