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
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.recipe.cmmi
Commits
b422c016
Commit
b422c016
authored
Sep 22, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not do in __init__ what is fine to do in install
parent
9bf0241a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
slapos/recipe/cmmi/__init__.py
slapos/recipe/cmmi/__init__.py
+11
-11
No files found.
slapos/recipe/cmmi/__init__.py
View file @
b422c016
...
...
@@ -119,7 +119,6 @@ class Recipe(object):
if
'@@LOCATION@@'
in
v
:
options
[
k
]
=
v
.
replace
(
'@@LOCATION@@'
,
location
)
self
.
original_environment
=
os
.
environ
.
copy
()
for
variable
in
options
.
get
(
'environment'
,
''
).
splitlines
():
if
variable
.
strip
():
try
:
...
...
@@ -127,16 +126,6 @@ class Recipe(object):
self
.
environ
[
key
.
strip
()]
=
value
except
ValueError
:
raise
UserError
(
'Invalid environment variable definition: %s'
%
variable
)
# Add prefix to PATH, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS
if
self
.
buildout_prefix
!=
''
:
self
.
environ
[
'PATH'
]
=
'%s/bin:%s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'PATH'
,
'/usr/bin'
))
self
.
environ
[
'CPPFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CPPFLAGS'
,
''
))
self
.
environ
[
'CFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CFLAGS'
,
''
))
self
.
environ
[
'CXXFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CXXFLAGS'
,
''
))
self
.
environ
[
'LDFLAGS'
]
=
'-L%s/lib %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'LDFLAGS'
,
''
))
if
options
.
get
(
'configure-command'
)
==
'cygport'
:
self
.
environ
.
setdefault
(
'CYGCONF_PREFIX'
,
options
[
'prefix'
])
def
augmented_environment
(
self
):
"""Returns a dictionary containing the current environment variables
...
...
@@ -269,6 +258,14 @@ class Recipe(object):
for
key
in
self
.
environ
:
self
.
environ
[
key
]
%=
os
.
environ
# Add prefix to PATH, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS
if
self
.
buildout_prefix
:
self
.
environ
[
'PATH'
]
=
'%s/bin:%s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'PATH'
,
'/usr/bin'
))
self
.
environ
[
'CPPFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CPPFLAGS'
,
''
))
self
.
environ
[
'CFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CFLAGS'
,
''
))
self
.
environ
[
'CXXFLAGS'
]
=
'-I%s/include %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'CXXFLAGS'
,
''
))
self
.
environ
[
'LDFLAGS'
]
=
'-L%s/lib %s'
%
(
self
.
buildout_prefix
,
self
.
environ
.
get
(
'LDFLAGS'
,
''
))
make_cmd
=
self
.
options
.
get
(
'make-binary'
,
'make'
).
strip
()
make_options
=
' '
.
join
(
self
.
options
.
get
(
'make-options'
,
''
).
split
())
make_targets
=
' '
.
join
(
self
.
options
.
get
(
'make-targets'
,
'install'
).
split
())
...
...
@@ -276,6 +273,9 @@ class Recipe(object):
configure_options
=
self
.
options
.
get
(
'configure-options'
,
''
).
split
()
configure_cmd
=
self
.
options
.
get
(
'configure-command'
,
''
).
strip
()
if
configure_cmd
==
'cygport'
:
self
.
environ
.
setdefault
(
'CYGCONF_PREFIX'
,
self
.
options
[
'prefix'
])
if
not
configure_cmd
:
# Default to using basic configure script.
configure_cmd
=
'./configure'
...
...
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