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
Jérome Perrin
slapos.buildout
Commits
78e894b4
Commit
78e894b4
authored
Mar 20, 2007
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added the (documented) egg option and deprecated use of the eggs option.
parent
4df0db1d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
5 deletions
+55
-5
zc.recipe.egg_/src/zc/recipe/egg/custom.py
zc.recipe.egg_/src/zc/recipe/egg/custom.py
+14
-2
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
+41
-3
No files found.
zc.recipe.egg_/src/zc/recipe/egg/custom.py
View file @
78e894b4
...
...
@@ -16,9 +16,11 @@
$Id$
"""
import
os
,
re
,
zipfile
import
logging
,
os
,
re
,
zipfile
import
zc.buildout.easy_install
logger
=
logging
.
getLogger
(
__name__
)
class
Base
:
def
__init__
(
self
,
buildout
,
name
,
options
):
...
...
@@ -65,7 +67,17 @@ class Custom(Base):
def
install
(
self
):
options
=
self
.
options
distribution
=
options
.
get
(
'eggs'
,
self
.
name
).
strip
()
distribution
=
options
.
get
(
'egg'
)
if
distribution
is
None
:
distribution
=
options
.
get
(
'eggs'
)
if
distribution
is
None
:
distribution
=
self
.
name
else
:
logger
.
warn
(
"The eggs option is deprecated. Use egg instead"
)
distribution
=
options
.
get
(
'egg'
,
options
.
get
(
'eggs'
,
self
.
name
)
).
strip
()
return
zc
.
buildout
.
easy_install
.
build
(
distribution
,
options
[
'_d'
],
self
.
build_ext
,
self
.
links
,
self
.
index
,
options
[
'executable'
],
[
options
[
'_e'
]],
...
...
zc.recipe.egg_/src/zc/recipe/egg/custom.txt
View file @
78e894b4
...
...
@@ -59,8 +59,8 @@ swig-opts
In addition, the following options can be used to specify the egg:
egg
An
eggs to install given as a setuptools requirement string.
This defaults to the part name.
An
specification for the egg to be created, to install given as a
setuptools requirement string.
This defaults to the part name.
find-links
A list of URLs, files, or directories to search for distributions.
...
...
@@ -242,6 +242,43 @@ will:
d extdemo-1.5-py2.4-linux-i686.egg
- zc.recipe.egg.egg-link
Controlling the version used
----------------------------
We can specify a specific version using the egg option:
>>> write('buildout.cfg',
... """
... [buildout]
... develop = demo
... parts = extdemo demo
...
... [extdemo]
... recipe = zc.recipe.egg:custom
... egg = extdemo ==1.4
... find-links = %(server)s
... index = %(server)s/index
... include-dirs = include
...
... [demo]
... recipe = zc.recipe.egg
... eggs = demo
... extdemo ==1.4
... entry-points = demo=demo:main
... """ % dict(server=link_server))
>>> print system(buildout+' -D'),
buildout: Develop: /sample-buildout/demo
buildout: Uninstalling demo
buildout: Uninstalling extdemo
buildout: Installing extdemo
zip_safe flag not set; analyzing archive contents...
buildout: Installing demo
>>> ls(sample_buildout, 'develop-eggs')
- demo.egg-link
d extdemo-1.4-py2.4-linux-i686.egg
- zc.recipe.egg.egg-link
Controlling develop-egg generation
==================================
...
...
@@ -342,9 +379,10 @@ set with a value of 2.
>>> print system(buildout),
buildout: Develop: /sample-buildout/demo
buildout: Uninstalling demo
buildout: Uninstalling extdemo
buildout: Installing extdemo
buildout:
Updat
ing demo
buildout:
Install
ing demo
Our develop-eggs now includes an egg link for extdemo:
...
...
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