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
b6aae481
Commit
b6aae481
authored
Aug 29, 2006
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an extra-paths option to specify extra paths to be inclided in
generated script paths.
parent
b208f821
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
10 deletions
+58
-10
zc.recipe.egg_/README.txt
zc.recipe.egg_/README.txt
+3
-8
zc.recipe.egg_/src/zc/recipe/egg/README.txt
zc.recipe.egg_/src/zc/recipe/egg/README.txt
+43
-1
zc.recipe.egg_/src/zc/recipe/egg/egg.py
zc.recipe.egg_/src/zc/recipe/egg/egg.py
+11
-1
zc.recipe.egg_/src/zc/recipe/egg/tests.py
zc.recipe.egg_/src/zc/recipe/egg/tests.py
+1
-0
No files found.
zc.recipe.egg_/README.txt
View file @
b6aae481
...
@@ -41,6 +41,9 @@ Custom eggs
...
@@ -41,6 +41,9 @@ Custom eggs
The zc.recipe.egg:custom recipe supports building custom eggs,
The zc.recipe.egg:custom recipe supports building custom eggs,
currently with specialized options for building extensions.
currently with specialized options for building extensions.
extra-paths
Extra paths to include in a generates script.
To do
To do
-----
-----
...
@@ -51,14 +54,6 @@ To do
...
@@ -51,14 +54,6 @@ To do
- More control over script generation. In particular, some way to
- More control over script generation. In particular, some way to
specify data t be recored in the script.
specify data t be recored in the script.
- Honor the buildout offline option.
- Windows suppprt
- Generate exe files
- Make sure tests work under windows
Change History
Change History
==============
==============
...
...
zc.recipe.egg_/src/zc/recipe/egg/README.txt
View file @
b6aae481
...
@@ -37,6 +37,8 @@ scripts
...
@@ -37,6 +37,8 @@ scripts
disabled. If the option isn't given at all, then all scripts
disabled. If the option isn't given at all, then all scripts
defined by the named eggs will be generated.
defined by the named eggs will be generated.
extra-paths
Extra paths to include in a generates script.
We have a link server that has a number of eggs:
We have a link server that has a number of eggs:
...
@@ -113,7 +115,7 @@ If we run the demo script, it prints out some minimal data:
...
@@ -113,7 +115,7 @@ If we run the demo script, it prints out some minimal data:
The value it prints out happens to be some values defined in the
The value it prints out happens to be some values defined in the
modules installed.
modules installed.
We can also run the py
_
demo script. Here we'll just print out
We can also run the py
-
demo script. Here we'll just print out
the bits if the path added to reflect the eggs:
the bits if the path added to reflect the eggs:
>>> print system(os.path.join(sample_buildout, 'bin', 'py-demo'),
>>> print system(os.path.join(sample_buildout, 'bin', 'py-demo'),
...
@@ -205,6 +207,46 @@ You can also control the name used for scripts:
...
@@ -205,6 +207,46 @@ You can also control the name used for scripts:
- foo
- foo
- py-zc.buildout
- py-zc.buildout
If we need to include extra paths in a script, we can use the
extra-paths option:
>>> write(sample_buildout, 'buildout.cfg',
... """
... [buildout]
... parts = demo
...
... [demo]
... recipe = zc.recipe.egg
... find-links = %(server)s
... index = %(server)s/index
... scripts = demo=foo
... extra-paths =
... /foo/bar
... /spam/eggs
... """ % dict(server=link_server))
>>> print system(buildout),
Let's look at the script that was generated:
>>> cat(sample_buildout, 'bin', 'foo') # doctest: +NORMALIZE_WHITESPACE
#!/usr/local/bin/python2.3
<BLANKLINE>
import sys
sys.path[0:0] = [
'/tmp/xyzsample-install/demo-0.3-py2.3.egg',
'/tmp/xyzsample-install/demoneeded-1.1-py2.3.egg',
'/foo/bar',
'/spam/eggs'
]
<BLANKLINE>
import eggrecipedemo
<BLANKLINE>
if __name__ == '__main__':
eggrecipedemo.main()
Offline mode
Offline mode
------------
------------
...
...
zc.recipe.egg_/src/zc/recipe/egg/egg.py
View file @
b6aae481
...
@@ -39,6 +39,14 @@ class Egg:
...
@@ -39,6 +39,14 @@ class Egg:
options
[
'index'
]
=
index
options
[
'index'
]
=
index
self
.
index
=
index
self
.
index
=
index
self
.
extra_paths
=
[
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
p
.
strip
())
for
p
in
options
.
get
(
'extra-paths'
,
''
).
split
(
'
\
n
'
)
if
p
.
strip
()
]
if
self
.
extra_paths
:
options
[
'extra-paths'
]
=
'
\
n
'
.
join
(
self
.
extra_paths
)
options
[
'_b'
]
=
buildout
[
'buildout'
][
'bin-directory'
]
options
[
'_b'
]
=
buildout
[
'buildout'
][
'bin-directory'
]
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
options
[
'_e'
]
=
buildout
[
'buildout'
][
'eggs-directory'
]
options
[
'_d'
]
=
buildout
[
'buildout'
][
'develop-eggs-directory'
]
options
[
'_d'
]
=
buildout
[
'buildout'
][
'develop-eggs-directory'
]
...
@@ -93,5 +101,7 @@ class Egg:
...
@@ -93,5 +101,7 @@ class Egg:
])
])
return
zc
.
buildout
.
easy_install
.
scripts
(
return
zc
.
buildout
.
easy_install
.
scripts
(
distributions
,
ws
,
options
[
'executable'
],
distributions
,
ws
,
options
[
'executable'
],
options
[
'_b'
],
scripts
=
scripts
)
options
[
'_b'
],
scripts
=
scripts
,
extra_paths
=
self
.
extra_paths
)
zc.recipe.egg_/src/zc/recipe/egg/tests.py
View file @
b6aae481
...
@@ -73,6 +73,7 @@ def test_suite():
...
@@ -73,6 +73,7 @@ def test_suite():
'
zc
.
buildout
.
egg
'),
'
zc
.
buildout
.
egg
'),
(re.compile('
(
\
n
?
)
-
([
a
-
zA
-
Z_
.
-
]
+
)
-
script
.
py
\
n
-
\\
2.
exe
\
n
'),
(re.compile('
(
\
n
?
)
-
([
a
-
zA
-
Z_
.
-
]
+
)
-
script
.
py
\
n
-
\\
2.
exe
\
n
'),
'
\\
1
-
\\
2
\
n
'),
'
\\
1
-
\\
2
\
n
'),
(re.compile('
#![^\n]+python[^\n]*\n'), '#!python\n'),
])
])
),
),
doctest
.
DocFileSuite
(
doctest
.
DocFileSuite
(
...
...
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