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.devtools
Commits
73b321cc
Commit
73b321cc
authored
Jan 17, 2019
by
André Anjos
💬
Browse files
[bdt] Set LC_ALL and LANG before we parse the click cmdline opts
parent
b61d0915
Pipeline
#26059
passed with stages
in 4 minutes
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/devtools/scripts/bdt.py
View file @
73b321cc
...
@@ -11,6 +11,7 @@ import click
...
@@ -11,6 +11,7 @@ import click
from
click_plugins
import
with_plugins
from
click_plugins
import
with_plugins
from
..log
import
setup
from
..log
import
setup
from
..bootstrap
import
set_environment
logger
=
setup
(
'bob'
)
logger
=
setup
(
'bob'
)
...
@@ -48,6 +49,11 @@ def raise_on_error(view_func):
...
@@ -48,6 +49,11 @@ def raise_on_error(view_func):
return
wraps
(
view_func
)(
_decorator
)
return
wraps
(
view_func
)(
_decorator
)
# must set LANG and LC_ALL before using click
set_environment
(
'LANG'
,
'en_US.UTF-8'
,
os
.
environ
,
verbose
=
False
)
set_environment
(
'LC_ALL'
,
os
.
environ
[
'LANG'
],
os
.
environ
,
verbose
=
False
)
@
with_plugins
(
pkg_resources
.
iter_entry_points
(
'bdt.cli'
))
@
with_plugins
(
pkg_resources
.
iter_entry_points
(
'bdt.cli'
))
@
click
.
group
(
cls
=
AliasedGroup
,
@
click
.
group
(
cls
=
AliasedGroup
,
context_settings
=
dict
(
help_option_names
=
[
'-?'
,
'-h'
,
'--help'
]))
context_settings
=
dict
(
help_option_names
=
[
'-?'
,
'-h'
,
'--help'
]))
...
@@ -56,7 +62,6 @@ def main():
...
@@ -56,7 +62,6 @@ def main():
#sets up basic environment variables required everywhere
#sets up basic environment variables required everywhere
from
..constants
import
CACERT
from
..constants
import
CACERT
from
..bootstrap
import
set_environment
set_environment
(
'SSL_CERT_FILE'
,
CACERT
,
os
.
environ
)
set_environment
(
'SSL_CERT_FILE'
,
CACERT
,
os
.
environ
)
set_environment
(
'REQUESTS_CA_BUNDLE'
,
CACERT
,
os
.
environ
)
set_environment
(
'REQUESTS_CA_BUNDLE'
,
CACERT
,
os
.
environ
)
bob/devtools/scripts/build.py
View file @
73b321cc
...
@@ -108,8 +108,6 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
...
@@ -108,8 +108,6 @@ def build(recipe_dir, python, condarc, config, no_test, append_file,
conda_config
=
make_conda_config
(
config
,
python
,
append_file
,
condarc_options
)
conda_config
=
make_conda_config
(
config
,
python
,
append_file
,
condarc_options
)
set_environment
(
'LANG'
,
'en_US.UTF-8'
,
verbose
=
True
)
set_environment
(
'LC_ALL'
,
os
.
environ
[
'LANG'
],
verbose
=
True
)
set_environment
(
'MATPLOTLIBRC'
,
MATPLOTLIB_RCDIR
,
verbose
=
True
)
set_environment
(
'MATPLOTLIBRC'
,
MATPLOTLIB_RCDIR
,
verbose
=
True
)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
...
...
bob/devtools/scripts/ci.py
View file @
73b321cc
...
@@ -246,8 +246,6 @@ def build(dry_run):
...
@@ -246,8 +246,6 @@ def build(dry_run):
pyver
=
os
.
environ
[
'PYTHON_VERSION'
]
pyver
=
os
.
environ
[
'PYTHON_VERSION'
]
logger
.
info
(
'os.environ["%s"] = %s'
,
'PYTHON_VERSION'
,
pyver
)
logger
.
info
(
'os.environ["%s"] = %s'
,
'PYTHON_VERSION'
,
pyver
)
set_environment
(
'LANG'
,
'en_US.UTF-8'
,
os
.
environ
,
verbose
=
True
)
set_environment
(
'LC_ALL'
,
os
.
environ
[
'LANG'
],
os
.
environ
,
verbose
=
True
)
set_environment
(
'MATPLOTLIBRC'
,
MATPLOTLIB_RCDIR
,
verbose
=
True
)
set_environment
(
'MATPLOTLIBRC'
,
MATPLOTLIB_RCDIR
,
verbose
=
True
)
# get information about the version of the package being built
# get information about the version of the package being built
...
...
bob/devtools/scripts/create.py
View file @
73b321cc
...
@@ -122,8 +122,6 @@ def create(name, recipe_dir, python, overwrite, condarc, use_local, config,
...
@@ -122,8 +122,6 @@ def create(name, recipe_dir, python, overwrite, condarc, use_local, config,
# set some environment variables before continuing
# set some environment variables before continuing
set_environment
(
'DOCSERVER'
,
server
,
os
.
environ
)
set_environment
(
'DOCSERVER'
,
server
,
os
.
environ
)
set_environment
(
'LANG'
,
'en_US.UTF-8'
,
os
.
environ
)
set_environment
(
'LC_ALL'
,
os
.
environ
[
'LANG'
],
os
.
environ
)
if
condarc
is
not
None
:
if
condarc
is
not
None
:
logger
.
info
(
'Loading CONDARC file from %s...'
,
condarc
)
logger
.
info
(
'Loading CONDARC file from %s...'
,
condarc
)
...
...
Write
Preview
Supports
Markdown
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