Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.buildout
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.buildout
Commits
cfb8b6eb
There was a problem fetching the pipeline summary.
Commit
cfb8b6eb
authored
7 years ago
by
André Anjos
Browse files
Options
Downloads
Patches
Plain Diff
Force debug flag from buildout (closes
#17
)
parent
271cf574
No related branches found
No related tags found
No related merge requests found
Pipeline
#
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/buildout/envwrapper.py
+11
-4
11 additions, 4 deletions
bob/buildout/envwrapper.py
bob/buildout/test_envwrapper.py
+1
-1
1 addition, 1 deletion
bob/buildout/test_envwrapper.py
with
12 additions
and
5 deletions
bob/buildout/envwrapper.py
+
11
−
4
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
)
...
...
This diff is collapsed.
Click to expand it.
bob/buildout/test_envwrapper.py
+
1
−
1
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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment