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
Rafael Monnerat
slapos.buildout
Commits
5700ed04
Commit
5700ed04
authored
Jun 24, 2012
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
another test passing w 3.2
parent
407036cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
15 deletions
+7
-15
src/zc/buildout/tests.py
src/zc/buildout/tests.py
+7
-15
No files found.
src/zc/buildout/tests.py
View file @
5700ed04
...
@@ -1987,17 +1987,15 @@ def dealing_with_extremely_insane_dependencies():
...
@@ -1987,17 +1987,15 @@ def dealing_with_extremely_insane_dependencies():
"""
"""
def
read_find_links_to_load_extensions
():
def
read_find_links_to_load_extensions
():
"""
r
"""
We'll create a wacky buildout extension that
is just another name for http
:
We'll create a wacky buildout extension that
just announces itself when used
:
>>> src = tmpdir('src')
>>> src = tmpdir('src')
>>> write(src, 'wacky_handler.py',
>>> write(src, 'wacky_handler.py',
... '''
... '''
... import urllib2
... import sys
... class Wacky(urllib2.HTTPHandler):
... wacky_open = urllib2.HTTPHandler.http_open
... def install(buildout=None):
... def install(buildout=None):
...
urllib2.install_opener(urllib2.build_opener(Wacky)
)
...
sys.stdout.write("I am a wacky extension\\n"
)
... ''')
... ''')
>>> write(src, 'setup.py',
>>> write(src, 'setup.py',
... '''
... '''
...
@@ -2021,13 +2019,9 @@ Now we'll create a buildout that uses this extension to load other packages:
...
@@ -2021,13 +2019,9 @@ Now we'll create a buildout that uses this extension to load other packages:
>>> write('buildout.cfg',
>>> write('buildout.cfg',
... '''
... '''
... [buildout]
... [buildout]
... parts =
demo
... parts =
... extensions = wackyextension
... extensions = wackyextension
... find-links = %(wacky_server)s/demoneeded-1.0.zip
... find-links = %(dist)s
... %(dist)s
... [demo]
... recipe = zc.recipe.egg
... eggs = demoneeded
... ''' % globals())
... ''' % globals())
When we run the buildout. it will load the extension from the dist
When we run the buildout. it will load the extension from the dist
...
@@ -2036,9 +2030,7 @@ directory and then use the wacky extension to load the demo package
...
@@ -2036,9 +2030,7 @@ directory and then use the wacky extension to load the demo package
>>> print_(system(buildout), end='')
>>> print_(system(buildout), end='')
Getting distribution for 'wackyextension'.
Getting distribution for 'wackyextension'.
Got wackyextension 1.
Got wackyextension 1.
Installing demo.
I am a wacky extension
Getting distribution for 'demoneeded'.
Got demoneeded 1.0.
"""
"""
...
...
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