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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos.buildout
Commits
1409c372
Commit
1409c372
authored
Jul 24, 2010
by
Gary Poster
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests pass on Py 2.7
parent
7fe1f4a7
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
61 additions
and
42 deletions
+61
-42
CHANGES.txt
CHANGES.txt
+4
-2
src/zc/buildout/allowhosts.txt
src/zc/buildout/allowhosts.txt
+12
-18
src/zc/buildout/bootstrap.txt
src/zc/buildout/bootstrap.txt
+5
-8
src/zc/buildout/dependencylinks.txt
src/zc/buildout/dependencylinks.txt
+3
-4
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+26
-2
z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
+2
-0
zc.recipe.egg_/src/zc/recipe/egg/tests.py
zc.recipe.egg_/src/zc/recipe/egg/tests.py
+9
-8
No files found.
CHANGES.txt
View file @
1409c372
...
...
@@ -6,6 +6,8 @@ Change History
New Features:
- zc.buildout supports Python 2.7.
- Added buildout:socket-timout option so that socket timeout can be configured
both from command line and from config files. (gotcha)
...
...
@@ -45,8 +47,8 @@ New Features:
- You can develop zc.buildout using Distribute instead of Setuptools. Use
the --distribute option on the dev.py script. (Releases should be tested
with both Distribute and Setuptools.) The tests for zc.buildout pass
with Setuptools and Python 2.4, 2.5,
and 2.6
; and with Distribute and
Python 2.5
and 2.6
. Using zc.buildout with Distribute and Python 2.4
with Setuptools and Python 2.4, 2.5,
2.6, and 2.7
; and with Distribute and
Python 2.5
, 2.6, and 2.7
. Using zc.buildout with Distribute and Python 2.4
is not recommended.
- The ``distribute-version`` now works in the [buildout] section, mirroring
...
...
src/zc/buildout/allowhosts.txt
View file @
1409c372
...
...
@@ -2,14 +2,14 @@ Allow hosts
-----------
On some environments the links visited by `zc.buildout` can be forbidden
by paranoiac firewalls. These URL might be on the chain of links
by paranoiac firewalls. These URL might be on the chain of links
visited by `zc.buildout` whether they are defined in the `find-links` option
or by various eggs in their `url`, `download_url` and `dependency_links` metadata.
It is even harder to track that package_index works like a spider and
It is even harder to track that package_index works like a spider and
might visit links and go to other location.
The `allow-hosts` option provides a way to prevent this, and
The `allow-hosts` option provides a way to prevent this, and
works exactly like the one provided in `easy_install`
(see `easy_install allow-hosts option`_).
...
...
@@ -17,7 +17,7 @@ You can provide a list of allowed host, together with wildcards::
[buildout]
...
allow-hosts =
*.python.org
example.com
...
...
@@ -36,7 +36,7 @@ Let's create a develop egg in our buildout that specifies
... zip_safe=True, version='1')
... ''')
Now let's configure the buildout to use the develop egg,
Now let's configure the buildout to use the develop egg,
together with some rules that disallow any website but PyPI and
local files::
...
...
@@ -55,14 +55,11 @@ local files::
Now we can run the buildout and make sure all attempts to dist.plone.org fails::
>>> print system(buildout)
>>> print system(buildout)
# doctest: +ELLIPSIS
Develop: '/sample-buildout/allowdemo'
Installing eggs.
<BLANKLINE>
...
Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
<BLANKLINE>
Couldn't find index page for 'kss.core' (maybe misspelled?)
Getting distribution for 'kss.core'.
...
While:
Installing eggs.
Getting distribution for 'kss.core'.
...
...
@@ -91,14 +88,11 @@ XXX (showcase with a svn:// file)
Now we can run the buildout and make sure all attempts to dist.plone.org fails::
>>> print system(buildout)
>>> print system(buildout)
# doctest: +ELLIPSIS
Develop: '/sample-buildout/allowdemo'
Installing eggs.
<BLANKLINE>
...
Link to http://dist.plone.org ***BLOCKED*** by --allow-hosts
<BLANKLINE>
Couldn't find index page for 'kss.core' (maybe misspelled?)
Getting distribution for 'kss.core'.
...
While:
Installing eggs.
Getting distribution for 'kss.core'.
...
...
@@ -115,7 +109,7 @@ Test for 1.0.5 breakage as in https://bugs.launchpad.net/zc.buildout/+bug/239212
... [buildout]
... parts=python
... foo = ${python:interpreter}
...
...
... [python]
... recipe=zc.recipe.egg
... eggs=zc.buildout
...
...
src/zc/buildout/bootstrap.txt
View file @
1409c372
...
...
@@ -52,11 +52,11 @@ Now we will try the `--version` option, which lets you define a version for
Let's try with an unknown version::
>>> print 'X'; print system(
>>> print 'X
X
'; print system(
... zc.buildout.easy_install._safe_arg(sys.executable)+' '+
... 'bootstrap.py --version UNKNOWN'); print 'X' # doctest: +ELLIPSIS
...
X
X
...
No local packages or download links found for zc.buildout==UNKNOWN...
...
...
...
@@ -128,8 +128,7 @@ option::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
Let's make sure the generated `buildout` script uses it::
...
...
@@ -158,8 +157,7 @@ Make sure both options can be used together::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
Let's make sure the generated `buildout` script uses ``Distribute`` *and*
...
...
@@ -192,8 +190,7 @@ Last, the -c option needs to work on bootstrap.py::
...
X
...
Generated script '/sample/bin/buildout'.
<BLANKLINE>
Generated script '/sample/bin/buildout'...
X
You can specify a location of ez_setup.py or distribute_setup, so you
...
...
src/zc/buildout/dependencylinks.txt
View file @
1409c372
...
...
@@ -20,7 +20,7 @@ testing repository.
Turn on logging on this server so that we can see when eggs are pulled
from it.
>>> get(link_server2 + 'enable_server_logging')
GET 200 /enable_server_logging
''
...
...
@@ -83,10 +83,9 @@ buildout to see where the egg comes from this time.
... for egg in glob(join(sample_buildout, 'eggs', 'demoneeded*.egg')):
... remove(sample_buildout, 'eggs', egg)
>>> remove_demoneeded_egg()
>>> print system(buildout)
>>> print system(buildout)
# doctest: +ELLIPSIS
Develop: '/sample-buildout/depdemo'
Updating eggs.
Couldn't find index page for 'demoneeded' (maybe misspelled?)
...
Getting distribution for 'demoneeded'.
While:
Updating eggs.
...
...
src/zc/buildout/tests.py
View file @
1409c372
...
...
@@ -3718,7 +3718,18 @@ normalize_bang = (
)
hide_distribute_additions
=
(
re
.
compile
(
'install_dir .+
\
n
'
),
''
)
hide_zip_safe_message
=
(
# This comes in a different place in the output in Python 2.7. It's not
# important to our tests. Hide it.
re
.
compile
(
'((?<=
\
n
)
\
n
)?zip_safe flag not set; analyzing archive contents...
\
n
'
),
''
)
hide_first_index_page_message
=
(
# This comes in a different place in the output in Python 2.7. It's not
# important to our tests. Hide it.
re
.
compile
(
"Couldn't find index page for '[^']+'
\
(m
a
ybe misspelled
\
?
\
)
\
n
"
),
''
)
def
test_suite
():
test_suite
=
[
doctest
.
DocFileSuite
(
...
...
@@ -3731,6 +3742,7 @@ def test_suite():
zc
.
buildout
.
testing
.
normalize_script
,
zc
.
buildout
.
testing
.
normalize_egg_py
,
zc
.
buildout
.
tests
.
hide_distribute_additions
,
hide_zip_safe_message
,
(
re
.
compile
(
'__buildout_signature__ = recipes-
\
S+
'
),
'
__buildout_signature__
=
recipes
-
SSSSSSSSSSS
'),
(re.compile('
executable
=
[
\
S
]
+
python
\
S
*
', re.I),
...
...
@@ -3809,6 +3821,7 @@ def test_suite():
zc.buildout.testing.normalize_script,
zc.buildout.testing.normalize_egg_py,
normalize_bang,
hide_first_index_page_message,
zc.buildout.tests.hide_distribute_additions,
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
'),
(re.compile('
[
-
d
]
(
setuptools
|
distribute
)
-
\
S
+
[.]
egg
'),
...
...
@@ -3852,6 +3865,7 @@ def test_suite():
zc
.
buildout
.
testing
.
normalize_script
,
zc
.
buildout
.
testing
.
normalize_egg_py
,
zc
.
buildout
.
tests
.
hide_distribute_additions
,
hide_first_index_page_message
,
(
re
.
compile
(
"buildout: Running
\
S*se
t
up.py"
),
'buildout: Running setup.py'
),
(
re
.
compile
(
'(setuptools|distribute)-
\
S+-
'
),
...
...
@@ -3910,7 +3924,17 @@ def test_suite():
])
),
doctest.DocFileSuite(
'testing_bugfix.txt'),
'testing_bugfix.txt',
checker=renormalizing.RENormalizing([
# Python 2.7
(re.compile(
re.escape(
'testrunner.logsupport.NullHandler instance at')),
'testrunner.logsupport.NullHandler object at'),
(re.compile(re.escape('logging.StreamHandler instance at')),
'logging.StreamHandler object at'),
])
),
]
# adding bootstrap.txt doctest to the suite
...
...
z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
View file @
1409c372
...
...
@@ -422,6 +422,7 @@ def test_suite():
zc
.
buildout
.
testing
.
normalize_egg_py
,
zc
.
buildout
.
tests
.
normalize_bang
,
zc
.
buildout
.
tests
.
hide_distribute_additions
,
zc
.
buildout
.
tests
.
hide_first_index_page_message
,
(
re
.
compile
(
r'zc.buildout(-\
S+)?[.]egg(-li
nk)?'
),
'zc.buildout.egg'
),
(
re
.
compile
(
'[-d] (setuptools|distribute)-[^-]+-'
),
'setuptools-X-'
),
...
...
@@ -444,6 +445,7 @@ def test_suite():
zc
.
buildout
.
testing
.
normalize_endings
,
zc
.
buildout
.
testing
.
normalize_egg_py
,
zc
.
buildout
.
tests
.
hide_distribute_additions
,
zc
.
buildout
.
tests
.
hide_first_index_page_message
,
(
re
.
compile
(
r'[a-zA-Z]:\\\\foo\\\\bar'
),
'/foo/bar'
),
]),
),
...
...
zc.recipe.egg_/src/zc/recipe/egg/tests.py
View file @
1409c372
...
...
@@ -85,15 +85,16 @@ def test_suite():
'
custom
.
txt
',
setUp=setUp, tearDown=zc.buildout.testing.buildoutTearDown,
checker=renormalizing.RENormalizing([
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings,
zc.buildout.testing.normalize_path,
zc.buildout.testing.normalize_endings,
zc.buildout.tests.hide_distribute_additions,
(re.compile("(d ((ext)?demo(needed)?|other)"
"-
\
d[.]
\
d-py)
\
d[.]
\
d(-
\
S+)?[.]egg
"
),
'
\\
1
V
.
V
.
egg
'),
(re.compile('
extdemo
.
c
\
n
.
+
\\
extdemo
.
exp
\
n
'), ''),
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
')
]),
zc.buildout.tests.hide_zip_safe_message,
(re.compile("(d ((ext)?demo(needed)?|other)"
"-
\
d[.]
\
d-py)
\
d[.]
\
d(-
\
S+)?[.]egg
"
),
'
\\
1
V
.
V
.
egg
'),
(re.compile('
extdemo
.
c
\
n
.
+
\\
extdemo
.
exp
\
n
'), ''),
(re.compile('
extdemo
[.]
pyd
'), '
extdemo
.
so
')
]),
),
))
...
...
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