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.build
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Eric Zheng
slapos.recipe.build
Commits
911e09e5
Commit
911e09e5
authored
Mar 13, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for 'path' argument
parent
cdc72d1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
slapos/recipe/build.py
slapos/recipe/build.py
+11
-4
No files found.
slapos/recipe/build.py
View file @
911e09e5
...
...
@@ -264,7 +264,7 @@ class Script:
os
.
path
.
join
(
buildout
[
'buildout'
][
'parts-directory'
],
self
.
name
))
# cleanup some variables
for
k
in
[
'location'
,
'url'
,
'md5sum'
]:
for
k
in
[
'location'
,
'url'
,
'md5sum'
,
'path'
]:
self
.
options
[
k
]
=
self
.
options
.
get
(
k
,
''
).
strip
()
self
.
options
[
'script'
]
=
self
.
options
.
get
(
'script'
,
self
.
script
)
%
\
self
.
options
...
...
@@ -382,9 +382,12 @@ class Cmmi(Script):
Compatibility on parameter level"""
script
=
"""
url = self.download(self.options['url'], self.options.get('md5sum'))
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
if self.options['url']:
url = self.download(self.options['url'], self.options.get('md5sum'))
extract_dir = self.extract(url)
workdir = guessworkdir(extract_dir)
else:
workdir = self.options['path']
configure_command = self.options.get('configure-command')
if configure_command is None or configure_command.lower() == 'None':
configure_command = ["./configure", "--prefix=%(location)s"] + %(configure-options)r.split()
...
...
@@ -408,3 +411,7 @@ call(make_command + ['install'], cwd=workdir, env=env)
options
[
'configure-options'
]
=
' '
.
join
(
options
.
get
(
'configure-options'
,
''
).
strip
().
splitlines
())
Script
.
__init__
(
self
,
buildout
,
name
,
options
)
if
options
[
'url'
]
and
options
[
'path'
]:
raise
zc
.
buildout
.
UserError
(
'You must use either "url" or "path", not both!'
)
if
not
(
options
[
'url'
]
or
options
[
'path'
]):
raise
zc
.
buildout
.
UserError
(
'You must provide either "url" or "path".'
)
\ No newline at end of file
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