Commit b98c7ebf authored by fschulze's avatar fschulze

The list of eggs in generated scripts is sorted and duplicates removed. This...

The list of eggs in generated scripts is sorted and duplicates removed. This prevents problems in WingIDE and makes it easier for humans to look at and use the list of eggs.


git-svn-id: http://svn.zope.org/repos/main/zc.buildout/trunk@82078 62d5b8a3-27da-0310-9561-8e5933582275
parent bd76e8ef
...@@ -14,6 +14,10 @@ Change History ...@@ -14,6 +14,10 @@ Change History
1.0.0b32 (2007-???) 1.0.0b32 (2007-???)
===================== =====================
- The list of eggs in generated scripts is sorted and duplicates
removed. This prevents problems in WingIDE and makes it easier for
humans to look at and use the list of eggs.
1.0.0b31 (2007-11-01) 1.0.0b31 (2007-11-01)
===================== =====================
......
...@@ -849,6 +849,9 @@ def scripts(reqs, working_set, executable, dest, ...@@ -849,6 +849,9 @@ def scripts(reqs, working_set, executable, dest,
path = [dist.location for dist in working_set] path = [dist.location for dist in working_set]
path.extend(extra_paths) path.extend(extra_paths)
# sort and remove duplicates
path = list(set(path))
path.sort()
path = repr(path)[1:-1].replace(', ', ',\n ') path = repr(path)[1:-1].replace(', ', ',\n ')
generated = [] generated = []
......
...@@ -681,9 +681,9 @@ to be included in the a generated script: ...@@ -681,9 +681,9 @@ to be included in the a generated script:
<BLANKLINE> <BLANKLINE>
import sys import sys
sys.path[0:0] = [ sys.path[0:0] = [
'/foo/bar',
'/sample-install/demo-0.3-py2.4.egg', '/sample-install/demo-0.3-py2.4.egg',
'/sample-install/demoneeded-1.1-py2.4.egg', '/sample-install/demoneeded-1.1-py2.4.egg',
'/foo/bar',
] ]
<BLANKLINE> <BLANKLINE>
import eggrecipedemo import eggrecipedemo
......
...@@ -85,8 +85,8 @@ Our buildout script has been updated to use the new eggs: ...@@ -85,8 +85,8 @@ Our buildout script has been updated to use the new eggs:
<BLANKLINE> <BLANKLINE>
import sys import sys
sys.path[0:0] = [ sys.path[0:0] = [
'/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',
'/sample-buildout/eggs/zc.buildout-99.99-py2.4.egg',
] ]
<BLANKLINE> <BLANKLINE>
import zc.buildout.buildout import zc.buildout.buildout
......
...@@ -358,9 +358,9 @@ Let's look at the script that was generated: ...@@ -358,9 +358,9 @@ Let's look at the script that was generated:
<BLANKLINE> <BLANKLINE>
import sys import sys
sys.path[0:0] = [ sys.path[0:0] = [
'/foo/bar',
'/sample-buildout/eggs/demo-0.4c1-py2.4.egg', '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg', '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
'/foo/bar',
'/spam/eggs', '/spam/eggs',
] ]
<BLANKLINE> <BLANKLINE>
...@@ -405,9 +405,9 @@ to be included in generated scripts: ...@@ -405,9 +405,9 @@ to be included in generated scripts:
<BLANKLINE> <BLANKLINE>
import sys import sys
sys.path[0:0] = [ sys.path[0:0] = [
'/foo/bar',
'/sample-buildout/eggs/demo-0.4c1-py2.4.egg', '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg', '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
'/foo/bar',
'/spam/eggs', '/spam/eggs',
] ]
<BLANKLINE> <BLANKLINE>
...@@ -463,9 +463,9 @@ declare entry points using the entry-points option: ...@@ -463,9 +463,9 @@ declare entry points using the entry-points option:
<BLANKLINE> <BLANKLINE>
import sys import sys
sys.path[0:0] = [ sys.path[0:0] = [
'/foo/bar',
'/sample-buildout/eggs/demo-0.4c1-py2.4.egg', '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg', '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
'/foo/bar',
'/spam/eggs', '/spam/eggs',
] ]
<BLANKLINE> <BLANKLINE>
......
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