Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.buildout
Commits
cfb8b6eb
Commit
cfb8b6eb
authored
Apr 26, 2017
by
André Anjos
💬
Browse files
Force debug flag from buildout (closes
#17
)
parent
271cf574
Pipeline
#8697
passed with stages
in 16 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/buildout/envwrapper.py
View file @
cfb8b6eb
...
...
@@ -65,6 +65,14 @@ class EnvironmentWrapper(object):
if
value
:
self
.
environ
[
key
]
=
value
.
strip
(
sep
)
def
__prepend_to_environ
(
key
,
value
,
sep
=
' '
):
if
self
.
environ
.
get
(
key
):
if
value
:
self
.
environ
[
key
]
=
value
.
strip
(
sep
)
+
sep
+
self
.
environ
[
key
]
else
:
if
value
:
self
.
environ
[
key
]
=
value
.
strip
(
sep
)
# joins all paths, respecting potential environment variables set by the
# user, with priority
__remove_environ
(
'BOB_PREFIX_PATH'
)
...
...
@@ -92,11 +100,10 @@ class EnvironmentWrapper(object):
__remove_environ
(
key
)
__append_to_environ
(
key
,
internal
)
__append_to_environ
(
key
,
saved
)
__
a
ppend_to_environ
(
key
,
os
.
environ
.
get
(
key
))
__p
re
pend_to_environ
(
key
,
os
.
environ
.
get
(
key
))
# for these environment variables, values set on the environment come last
# so they can override, values set on the buildout recipe or our internal
# settings
# for these environment variables, values set on the environment come first
# so we can override with our debug flag
if
cflags
is
not
None
:
_order_flags
(
'CFLAGS'
,
cflags
)
_order_flags
(
'CXXFLAGS'
,
cflags
)
...
...
bob/buildout/test_envwrapper.py
View file @
cfb8b6eb
...
...
@@ -227,7 +227,7 @@ def test_preserve_user():
nose
.
tools
.
eq_
(
len
(
os
.
environ
)
-
len
(
before
),
1
)
assert
os
.
environ
[
'CFLAGS'
].
end
swith
(
'-BUILDOUT-TEST-STRING'
)
assert
os
.
environ
[
'CFLAGS'
].
start
swith
(
'-BUILDOUT-TEST-STRING'
)
e
.
unset
()
for
key
in
before
:
...
...
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