Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.recipe.template
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
Jérome Perrin
slapos.recipe.template
Commits
011e2f1c
Commit
011e2f1c
authored
Oct 30, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Harden tests, add note about mode limitations.
parent
6f236c2b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
setup.py
setup.py
+1
-1
slapos/recipe/template/README.jinja2.txt
slapos/recipe/template/README.jinja2.txt
+5
-2
slapos/recipe/template/tests.py
slapos/recipe/template/tests.py
+1
-1
No files found.
setup.py
View file @
011e2f1c
...
@@ -26,7 +26,7 @@ setup(name=name,
...
@@ -26,7 +26,7 @@ setup(name=name,
install_requires
=
[
install_requires
=
[
'setuptools'
,
# namespaces
'setuptools'
,
# namespaces
'zc.buildout'
,
# plays with buildout
'zc.buildout'
,
# plays with buildout
'jinja2
>=
2.7'
,
'jinja2
>=
2.7'
,
],
],
zip_safe
=
True
,
zip_safe
=
True
,
entry_points
=
{
entry_points
=
{
...
...
slapos/recipe/template/README.jinja2.txt
View file @
011e2f1c
...
@@ -238,7 +238,7 @@ You can specify the mode for rendered file::
...
@@ -238,7 +238,7 @@ You can specify the mode for rendered file::
... template = template.in
... template = template.in
... rendered = foo
... rendered = foo
... context = key bar buildout:parts
... context = key bar buildout:parts
... mode = 20
6
... mode = 20
5
... ''')
... ''')
>>> print system(join('bin', 'buildout')),
>>> print system(join('bin', 'buildout')),
Uninstalling template.
Uninstalling template.
...
@@ -249,7 +249,10 @@ And the generated file with have the right permissions::
...
@@ -249,7 +249,10 @@ And the generated file with have the right permissions::
>>> import stat
>>> import stat
>>> import os
>>> import os
>>> print oct(stat.S_IMODE(os.stat('foo').st_mode))
>>> print oct(stat.S_IMODE(os.stat('foo').st_mode))
0206
0205
Note that Buildout will not allow you to have write permission for others
and will silently remove it (i.e a 207 mode will become 205).
Template imports
Template imports
~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
...
...
slapos/recipe/template/tests.py
View file @
011e2f1c
...
@@ -38,7 +38,7 @@ def test_suite():
...
@@ -38,7 +38,7 @@ def test_suite():
filename
,
filename
,
setUp
=
setUp
,
setUp
=
setUp
,
tearDown
=
testing
.
buildoutTearDown
,
tearDown
=
testing
.
buildoutTearDown
,
optionflags
=
doctest
.
ELLIPSIS
,
optionflags
=
(
doctest
.
ELLIPSIS
|
doctest
.
NORMALIZE_WHITESPACE
)
,
)
for
filename
in
[
)
for
filename
in
[
'README.txt'
,
'README.txt'
,
'README.jinja2.txt'
,
'README.jinja2.txt'
,
...
...
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