Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.buildout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Yusei Tahara
slapos.buildout
Commits
d0672d2c
Commit
d0672d2c
authored
Nov 23, 2012
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable prefer-final by default
parent
ccdf2870
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
54 additions
and
54 deletions
+54
-54
src/zc/buildout/buildout.py
src/zc/buildout/buildout.py
+1
-1
src/zc/buildout/buildout.txt
src/zc/buildout/buildout.txt
+4
-4
src/zc/buildout/dependencylinks.txt
src/zc/buildout/dependencylinks.txt
+6
-6
src/zc/buildout/downloadcache.txt
src/zc/buildout/downloadcache.txt
+5
-5
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+17
-17
zc.recipe.egg_/src/zc/recipe/egg/README.txt
zc.recipe.egg_/src/zc/recipe/egg/README.txt
+19
-19
zc.recipe.egg_/src/zc/recipe/egg/api.txt
zc.recipe.egg_/src/zc/recipe/egg/api.txt
+2
-2
No files found.
src/zc/buildout/buildout.py
View file @
d0672d2c
...
...
@@ -134,7 +134,7 @@ _buildout_default_options = _annotate_section({
'newest'
:
'true'
,
'offline'
:
'false'
,
'parts-directory'
:
'parts'
,
'prefer-final'
:
'
fals
e'
,
'prefer-final'
:
'
tru
e'
,
'python'
:
'buildout'
,
'socket-timeout'
:
''
,
'use-dependency-links'
:
'true'
,
...
...
src/zc/buildout/buildout.txt
View file @
d0672d2c
...
...
@@ -764,7 +764,7 @@ COMMAND_LINE_VALUE).
/sample-buildout/buildout.cfg
parts-directory= parts
DEFAULT_VALUE
prefer-final=
fals
e
prefer-final=
tru
e
DEFAULT_VALUE
python= buildout
DEFAULT_VALUE
...
...
@@ -2284,7 +2284,7 @@ database is shown.
offline = false
parts =
parts-directory = /sample-buildout/parts
prefer-final =
fals
e
prefer-final =
tru
e
python = buildout
socket-timeout =
use-dependency-links = true
...
...
@@ -2581,11 +2581,11 @@ or paths to use:
Got zc.recipe.egg 1.3.3dev.
Installing py.
Getting distribution for 'demo'.
Got demo 0.
4c1
.
Got demo 0.
3
.
Getting distribution for 'other'.
Got other 1.0.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Generated script '/sample-bootstrapped/bin/demo'.
Generated script '/sample-bootstrapped/bin/distutilsscript'.
Generated interpreter '/sample-bootstrapped/bin/py'.
...
...
src/zc/buildout/dependencylinks.txt
View file @
d0672d2c
...
...
@@ -55,11 +55,11 @@ Now we can run the buildout.
>>> print_(system(buildout), end='')
GET 200 /
GET 200 /demoneeded-1.
2c
1.zip
GET 200 /demoneeded-1.1.zip
Develop: '/sample-buildout/depdemo'
Installing eggs.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Notice that the egg was retrieved from the logging server.
...
...
@@ -112,7 +112,7 @@ to look for eggs.
Develop: '/sample-buildout/depdemo'
Installing eggs.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
This time the dependency egg was found on the server without logging
configured.
...
...
@@ -134,7 +134,7 @@ specify different places to look for the dependency egg.
Develop: '/sample-buildout/depdemo'
Updating eggs.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
So when both setuptools and buildout specify places to search for
eggs, the dependency_links takes precedence over find-links.
...
...
@@ -164,7 +164,7 @@ Here is an example of using this option to disable dependency_links.
Develop: '/sample-buildout/depdemo'
Updating eggs.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Notice that this time the egg isn't downloaded from the logging server.
...
...
@@ -189,4 +189,4 @@ before. The dependency's are looked for first in the logging server.
Develop: '/sample-buildout/depdemo'
Updating eggs.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
src/zc/buildout/downloadcache.txt
View file @
d0672d2c
...
...
@@ -61,12 +61,12 @@ server as usual:
>>> print_(system(buildout), end='')
GET 200 /
GET 200 /demo-0.2-py2.4.egg
GET 200 /demoneeded-1.
2c
1.zip
GET 200 /demoneeded-1.1.zip
Installing eggs.
Getting distribution for 'demo==0.2'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
We'll also get the download cache populated. The buildout doesn't put
...
...
@@ -79,7 +79,7 @@ dist:
>>> ls(cache, 'dist')
- demo-0.2-py2.4.egg
- demoneeded-1.
2c
1.zip
- demoneeded-1.1.zip
If we remove the installed eggs from eggs directory and re-run the buildout:
...
...
@@ -94,7 +94,7 @@ If we remove the installed eggs from eggs directory and re-run the buildout:
Getting distribution for 'demo==0.2'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
We see that the distributions aren't downloaded, because they're
downloaded from the cache.
...
...
@@ -137,5 +137,5 @@ install-from-cache option set to true:
Getting distribution for 'demo'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
src/zc/buildout/tests.py
View file @
d0672d2c
...
...
@@ -1708,13 +1708,13 @@ def bug_105081_Specific_egg_versions_are_ignored_when_newer_eggs_are_around():
>>> print_(system(buildout), end='')
Installing x.
Getting distribution for 'demo'.
Got demo 0.
4c1
.
Got demo 0.
3
.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Generated script '/sample-buildout/bin/demo'.
>>> print_(system(join('bin', 'demo')), end='')
4 2
3 1
>>> write('buildout.cfg',
... '''
...
...
@@ -1735,7 +1735,7 @@ def bug_105081_Specific_egg_versions_are_ignored_when_newer_eggs_are_around():
Generated script '/sample-buildout/bin/demo'.
>>> print_(system(join('bin', 'demo')), end='')
1
2
1
1
"""
if
sys
.
version_info
>
(
2
,
4
):
...
...
@@ -2213,7 +2213,7 @@ def buildout_prefer_final_option():
The prefer-final buildout option can be used for override the default
preference for newer distributions.
The default is prefer-final =
fals
e:
The default is prefer-final =
tru
e:
>>> write('buildout.cfg',
... '''
...
...
@@ -2229,19 +2229,19 @@ The default is prefer-final = false:
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'distribute'.
...
Picked: demo = 0.
4c1
Picked: demo = 0.
3
...
Picked: demoneeded = 1.
2c
1
Picked: demoneeded = 1.1
Here we see that the final versions of demo and demoneeded are used.
We get the same behavior if we add prefer-final =
fals
e
We get the same behavior if we add prefer-final =
tru
e
>>> write('buildout.cfg',
... '''
... [buildout]
... parts = eggs
... find-links = %(link_server)s
... prefer-final =
fals
e
... prefer-final =
tru
e
...
... [eggs]
... recipe = zc.recipe.egg:eggs
...
...
@@ -2251,11 +2251,11 @@ We get the same behavior if we add prefer-final = false
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'distribute'.
...
Picked: demo = 0.
4c1
Picked: demo = 0.
3
...
Picked: demoneeded = 1.
2c
1
Picked: demoneeded = 1.1
If we specify prefer-final =
tru
e, we'll get the newest
If we specify prefer-final =
fals
e, we'll get the newest
distributions:
>>> write('buildout.cfg',
...
...
@@ -2263,7 +2263,7 @@ distributions:
... [buildout]
... parts = eggs
... find-links = %(link_server)s
... prefer-final =
tru
e
... prefer-final =
fals
e
...
... [eggs]
... recipe = zc.recipe.egg:eggs
...
...
@@ -2273,9 +2273,9 @@ distributions:
>>> print_(system(buildout+' -v'), end='') # doctest: +ELLIPSIS
Installing 'zc.buildout', 'distribute'.
...
Picked: demo = 0.
3
Picked: demo = 0.
4c1
...
Picked: demoneeded = 1.1
Picked: demoneeded = 1.
2c
1
We get an error if we specify anything but true or false:
...
...
@@ -2398,8 +2398,8 @@ def pyc_and_pyo_files_have_correct_paths():
... ''')
>>> print_(system(join('bin', 'py')+ ' t.py'), end='')
/sample-buildout/eggs/demo-0.
4c1
-py2.4.egg/eggrecipedemo.py
/sample-buildout/eggs/demoneeded-1.
2c
1-py2.4.egg/eggrecipedemoneeded.py
/sample-buildout/eggs/demo-0.
3
-py2.4.egg/eggrecipedemo.py
/sample-buildout/eggs/demoneeded-1.1-py2.4.egg/eggrecipedemoneeded.py
"""
def
dont_mess_with_standard_dirs_with_variable_refs
():
...
...
zc.recipe.egg_/src/zc/recipe/egg/README.txt
View file @
d0672d2c
...
...
@@ -67,13 +67,13 @@ Let's run the buildout:
Getting distribution for 'demo<0.3'.
Got demo 0.2.
Getting distribution for 'demoneeded'.
Got demoneeded 1.
2c
1.
Got demoneeded 1.1.
Now, if we look at the buildout eggs directory:
>>> ls(sample_buildout, 'eggs')
d demo-0.2-py2.3.egg
d demoneeded-1.
2c
1-py2.3.egg
d demoneeded-1.1-py2.3.egg
d distribute-0.6-py2.3.egg
d zc.buildout-1.0-py2.3.egg
...
...
@@ -204,7 +204,7 @@ This is useful for debugging and testing.
If we run the demo script, it prints out some minimal data:
>>> print_(system(join(sample_buildout, 'bin', 'demo')), end='')
2
2
2
1
The value it prints out happens to be some values defined in the
modules installed.
...
...
@@ -221,7 +221,7 @@ the bits if the path added to reflect the eggs:
... """).replace('>>> ', '').replace('... ', ''), end='')
... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
demo-0.2-py2.4.egg
demoneeded-1.
2c
1-py2.4.egg
demoneeded-1.1-py2.4.egg
Egg updating
------------
...
...
@@ -262,7 +262,7 @@ We didn't get an update for demo:
>>> ls(sample_buildout, 'eggs')
d demo-0.2-py2.3.egg
d demoneeded-1.
2c
1-py2.3.egg
d demoneeded-1.1-py2.3.egg
d distribute-0.6-py2.3.egg
d zc.buildout-1.0-py2.3.egg
...
...
@@ -272,22 +272,22 @@ we'll get an update for demo:
>>> print_(system(buildout), end='')
Updating demo.
Getting distribution for 'demo'.
Got demo 0.
4c1
.
Got demo 0.
3
.
Generated script '/sample-buildout/bin/demo'.
Then we'll get a new demo egg:
>>> ls(sample_buildout, 'eggs')
d demo-0.2-py2.3.egg
d demo-0.
4c1
-py2.3.egg
d demoneeded-1.
2c
1-py2.3.egg
d demo-0.
3
-py2.3.egg
d demoneeded-1.1-py2.3.egg
d distribute-0.6-py2.4.egg
d zc.buildout-1.0-py2.4.egg
The script is updated too:
>>> print_(system(join(sample_buildout, 'bin', 'demo')), end='')
4 2
3 1
Controlling script generation
-----------------------------
...
...
@@ -372,8 +372,8 @@ Let's look at the script that was generated:
<BLANKLINE>
import sys
sys.path[0:0] = [
'/sample-buildout/eggs/demo-0.
4c1
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.
2c
1-py2.4.egg',
'/sample-buildout/eggs/demo-0.
3
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.1-py2.4.egg',
'/foo/bar',
'/sample-buildout/spam',
]
...
...
@@ -425,8 +425,8 @@ Let's look at the script that was generated:
<BLANKLINE>
import sys
sys.path[0:0] = [
join(base, 'eggs/demo-0.
4c1
-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.
2c
1-pyN.N.egg'),
join(base, 'eggs/demo-0.
3
-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/foo/bar',
join(base, 'spam'),
]
...
...
@@ -472,8 +472,8 @@ each individual script section:
<BLANKLINE>
import sys
sys.path[0:0] = [
join(base, 'eggs/demo-0.
4c1
-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.
2c
1-pyN.N.egg'),
join(base, 'eggs/demo-0.
3
-pyN.N.egg'),
join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
'/foo/bar',
join(base, 'spam'),
]
...
...
@@ -519,8 +519,8 @@ to be included in generated scripts:
<BLANKLINE>
import sys
sys.path[0:0] = [
'/sample-buildout/eggs/demo-0.
4c1
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.
2c
1-py2.4.egg',
'/sample-buildout/eggs/demo-0.
3
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.1-py2.4.egg',
'/foo/bar',
'/sample-buildout/spam',
]
...
...
@@ -577,8 +577,8 @@ declare entry points using the entry-points option:
<BLANKLINE>
import sys
sys.path[0:0] = [
'/sample-buildout/eggs/demo-0.
4c1
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.
2c
1-py2.4.egg',
'/sample-buildout/eggs/demo-0.
3
-py2.4.egg',
'/sample-buildout/eggs/demoneeded-1.1-py2.4.egg',
'/foo/bar',
'/sample-buildout/spam',
]
...
...
zc.recipe.egg_/src/zc/recipe/egg/api.txt
View file @
d0672d2c
...
...
@@ -91,7 +91,7 @@ of extra requirements to be included in the working set.
Working set:
demo 0.2
other 1.0
demoneeded 1.
2c
1
demoneeded 1.1
extra paths: []
We can see that the options were augmented with additional data
...
...
@@ -149,6 +149,6 @@ recipe instance:
Working set:
demo 0.2
other 1.0
demoneeded 1.
2c
1
demoneeded 1.1
extra paths: ['/foo/bar', '/spam/eggs']
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment