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.cmmi
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
slapos.recipe.cmmi
Commits
5962845b
Commit
5962845b
authored
Jul 11, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change platform section name from [arch-platform-name] to [name:platform]
parent
3fddde03
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
20 deletions
+8
-20
slapos/recipe/cmmi/README.txt
slapos/recipe/cmmi/README.txt
+7
-19
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+1
-1
No files found.
slapos/recipe/cmmi/README.txt
View file @
5962845b
...
@@ -227,11 +227,7 @@ Supported options
...
@@ -227,11 +227,7 @@ Supported options
the former will be overridden by the latter allowing per-part customization.
the former will be overridden by the latter allowing per-part customization.
The recipe uses separated part to support custom options in different
The recipe uses separated part to support custom options in different
platforms. These platform's part has a pattern "platform-part" or
platforms. These platform's part has a pattern "part:platform".
"arch-platform-part".
arch could be 'x86', 'x86_64', 'ia64' ... which equals
platform.machine().
platform could be 'linux', 'cygwin', 'macos', 'sunos', 'freebsd',
platform could be 'linux', 'cygwin', 'macos', 'sunos', 'freebsd',
'netbsd', 'unixware' ... which equals a formatted sys.platform.
'netbsd', 'unixware' ... which equals a formatted sys.platform.
...
@@ -241,10 +237,10 @@ For example,
...
@@ -241,10 +237,10 @@ For example,
[bzip2]
[bzip2]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
[
x86-cygwin-bzip2
]
[
bzip2:cygwin
]
patches = cygwin-bzip2-1.0.6.src.patch
patches = cygwin-bzip2-1.0.6.src.patch
All the options in the
platform-part
have high priority level.
All the options in the
[part:platform]
have high priority level.
The recipe first searches the exact match, if no found. Ignore arch
The recipe first searches the exact match, if no found. Ignore arch
and search again, if still found nothing. Use no platform part.
and search again, if still found nothing. Use no platform part.
...
@@ -376,7 +372,7 @@ a custom location within the buildout::
...
@@ -376,7 +372,7 @@ a custom location within the buildout::
... """ % src)
... """ % src)
>>> print(system(buildout))
>>> print(system(buildout))
Uninstalling package.
Uninstalling package
x
.
Installing foobar.
Installing foobar.
foobar: [ENV] TMP = /sample_buildout/parts/foobar/tmp
foobar: [ENV] TMP = /sample_buildout/parts/foobar/tmp
foobar: Extracting package to /sample_buildout/parts/foobar__compile__
foobar: Extracting package to /sample_buildout/parts/foobar__compile__
...
@@ -675,7 +671,7 @@ The recipe can specify build options for each platform. For example,
...
@@ -675,7 +671,7 @@ The recipe can specify build options for each platform. For example,
... pre-configure = echo "Configure in common platform"
... pre-configure = echo "Configure in common platform"
... post-install = echo "Finished."
... post-install = echo "Finished."
...
...
... [
cygwin-package
]
... [
package:cygwin
]
... pre-configure = echo "Configure in the CYGWIN platform"
... pre-configure = echo "Configure in the CYGWIN platform"
... pre-install = echo "Installing in the CYGWIN"
... pre-install = echo "Installing in the CYGWIN"
... post-install = echo -n "CYGWIN " && ${package:post-install}
... post-install = echo -n "CYGWIN " && ${package:post-install}
...
@@ -698,7 +694,7 @@ are only ``pre-configure`` and ``post-install``. the output will be
...
@@ -698,7 +694,7 @@ are only ``pre-configure`` and ``post-install``. the output will be
Finished.
Finished.
In the cygwin, the recipe merges the options in the parts 'package'
In the cygwin, the recipe merges the options in the parts 'package'
and '
cygwin-package
'. The output will be
and '
package:cygwin
'. The output will be
>>> print system(buildout)
>>> print system(buildout)
Uninstalling package.
Uninstalling package.
...
@@ -715,14 +711,6 @@ and 'cygwin-package'. The output will be
...
@@ -715,14 +711,6 @@ and 'cygwin-package'. The output will be
package: Executing post-install
package: Executing post-install
CYGWIN Finished.
CYGWIN Finished.
Arch is supported either, For example,
[x86-cygwin-package]
...
The recipe will first search part looks like "arch-platform-part",
then "platform-part".
Union prefix
Union prefix
============
============
...
...
slapos/recipe/cmmi/__init__.py
View file @
5962845b
...
@@ -23,7 +23,7 @@ class Recipe(object):
...
@@ -23,7 +23,7 @@ class Recipe(object):
self
.
name
=
name
self
.
name
=
name
# Merge options if there is a matched platform section
# Merge options if there is a matched platform section
platform_options
=
self
.
get_platform_options
(
)
platform_options
=
self
.
buildout
.
get
(
"%s:%s"
%
(
name
,
sys
.
platform
)
)
if
platform_options
is
None
:
if
platform_options
is
None
:
self
.
original_options
=
options
self
.
original_options
=
options
else
:
else
:
...
...
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