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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Dmitry Blinov
slapos.recipe.cmmi
Commits
8971348d
Commit
8971348d
authored
Oct 10, 2018
by
Bryton Lacquement
🚪
Committed by
Julien Muchembled
Oct 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More Py3 fixes
parent
9ca803bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
slapos/recipe/cmmi/README.txt
slapos/recipe/cmmi/README.txt
+18
-18
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+3
-4
No files found.
slapos/recipe/cmmi/README.txt
View file @
8971348d
...
...
@@ -326,7 +326,7 @@ Check option "promises"
This will download, extract and build our demo package with the
default build options.
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing packagex.
configure --prefix=/sample_buildout/parts/packagex
...
...
@@ -620,7 +620,7 @@ Let's create a buildout to use these options.
This will run pre-configure, pre-build, pre-install, post-install as
shell command in the corresponding stage.
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
package: Executing pre-configure
...
...
@@ -660,7 +660,7 @@ The recipe can specify build options for each platform. For example,
In the linux, the recipe gets the options from part 'package', there
are only ``pre-configure`` and ``post-install``. the output will be
#>>> print
system(buildout
)
#>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
package: Executing pre-configure
...
...
@@ -703,7 +703,7 @@ Let's see what happens when set prefix in the buildout section:
... pre-configure = mkdir -p "${buildout:prefix}"
... """ % src)
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
package: Executing pre-configure
...
...
@@ -733,7 +733,7 @@ example,
... post-install = test -d "${buildout:prefix}" || echo "None"
... """ % src)
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
package: Executing pre-configure
...
...
@@ -766,7 +766,7 @@ prefix:
... pre-install = sleep 2; mkdir -p "${buildout:prefix}" ; echo x >"${buildout:prefix}/b.txt"; echo
... """ % (src, src))
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
configure --prefix=/sample_buildout/mylocal
...
...
@@ -801,7 +801,7 @@ as nothing it is removing):
... pre-install = sleep 2; mkdir -p "${buildout:prefix}" ; echo x >"${buildout:prefix}/a.txt"
... """ % src)
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package-2.
Updating package.
...
...
@@ -854,7 +854,7 @@ value in the part section. For example,
... post-install = echo package magic prefix is ${package:prefix}
... """ % (src, src))
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
Installing package-2.
...
...
@@ -878,7 +878,7 @@ can display "prefix" value in the stdout.
... pre-install = sed -i -e "s/installing package/installing package at \$\$prefix /g" Makefile
... """ % src)
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package-2.
Uninstalling package.
Installing package.
...
...
@@ -904,7 +904,7 @@ replaced with the recipe final prefix.
... pre-install = sed -i -e "s/installing package/installing package at \$\$prefix /g" Makefile
... """ % src)
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package.
configure
...
...
@@ -938,7 +938,7 @@ dependent parts before install this part. For example,
Here "package-2" will be installed first, because it's a denpend part
of "package":
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Installing package-2.
configure --prefix=/sample_buildout/parts/package-2
...
...
@@ -970,7 +970,7 @@ Now let's add a new option for "package-2",
Look, "package" is reinstalled either:
>>> print
system(buildout
)
>>> print
(system(buildout)
)
Uninstalling package.
Uninstalling package-2.
Installing package-2.
...
...
@@ -1005,7 +1005,7 @@ If no shared-parts is set, and shared is True, shared feature is not used:
... shared = True
... """% src)
>>> print
system(buildout
) #doctest:+ELLIPSIS
>>> print
(system(buildout)
) #doctest:+ELLIPSIS
Uninstalling package.
Uninstalling package-2.
Installing package.
...
...
@@ -1023,7 +1023,7 @@ process as the recipe tried.
>>> import sys
>>> tarpath = os.path.join(src, 'package-0.0.0.tar.gz')
>>> with tarfile.open(tarpath, 'w:gz') as tar:
... configure = 'invalid'
... configure =
b
'invalid'
... info = tarfile.TarInfo('configure.off')
... info.size = len(configure)
... info.mode = 0o755
...
...
@@ -1042,7 +1042,7 @@ process as the recipe tried.
... environment =
... FOO=bar
... """ % (shared_dir, src))
>>> print
system(buildout
) #doctest:+ELLIPSIS
>>> print
(system(buildout)
) #doctest:+ELLIPSIS
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
Uninstalling package.
Installing package.
...
...
@@ -1062,7 +1062,7 @@ process as the recipe tried.
If shared-parts is set and shared is True, package will be installed in shared_part/package/a hash of the recipe's configuration options
>>> _ = system('mv %s/package-0.0.0.tar.gz.bak %s/package-0.0.0.tar.gz' % (src, src))
>>> print
system(buildout
) #doctest:+ELLIPSIS
>>> print
(system(buildout)
) #doctest:+ELLIPSIS
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
Installing package.
package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
...
...
@@ -1087,7 +1087,7 @@ Do nothing if one package has been installed.
... environment =
... FOO=bar
... """ % (shared_dir, src))
>>> print
system(buildout
) #doctest:+ELLIPSIS
>>> print
(system(buildout)
) #doctest:+ELLIPSIS
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
Installing package.
package: Checking whether package is installed at shared path: .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/...
...
...
@@ -1108,7 +1108,7 @@ If options change, reinstall in different location:
... change = True
... """ % (shared_dir, src))
>>> print
system(buildout
) #doctest:+ELLIPSIS
>>> print
(system(buildout)
) #doctest:+ELLIPSIS
package: shared directory .../slapos.recipe.cmmi/slapos/recipe/cmmi/shared/package/... set for package
Uninstalling package.
Installing package.
...
...
slapos/recipe/cmmi/__init__.py
View file @
8971348d
...
...
@@ -95,7 +95,7 @@ class Recipe(object):
for
part
in
options
.
get
(
'dependencies'
,
''
).
split
():
m
=
md5
()
for
v
in
self
.
buildout
[
part
].
values
():
m
.
update
(
v
)
m
.
update
(
v
.
encode
(
'utf-8'
)
)
dependencies
.
append
(
m
.
hexdigest
())
options
[
'dependencies'
]
=
' '
.
join
(
dependencies
)
...
...
@@ -109,8 +109,7 @@ class Recipe(object):
else
:
options
[
'compile-directory'
]
=
options
[
'path'
]
from
copy
import
copy
for
k
,
v
in
copy
(
options
.
items
()):
for
k
,
v
in
list
(
options
.
items
()):
if
'@@LOCATION@@'
in
v
:
options
[
k
]
=
v
.
replace
(
'@@LOCATION@@'
,
default_location
)
...
...
@@ -214,7 +213,7 @@ class Recipe(object):
log
=
logging
.
getLogger
(
self
.
name
)
args
=
[
'find'
,
self
.
buildout_prefix
,
'-cnewer'
,
ref_file
,
'!'
,
'-type'
,
'd'
]
try
:
p
=
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
)
p
=
subprocess
.
Popen
(
args
,
stdout
=
subprocess
.
PIPE
,
universal_newlines
=
True
)
files
,
_
=
p
.
communicate
()
retcode
=
p
.
returncode
if
retcode
<
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