Commit 73b321cc authored by André Anjos's avatar 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
......@@ -11,6 +11,7 @@ import click
from click_plugins import with_plugins
from ..log import setup
from ..bootstrap import set_environment
logger = setup('bob')
......@@ -48,6 +49,11 @@ def raise_on_error(view_func):
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'))
@click.group(cls=AliasedGroup,
context_settings=dict(help_option_names=['-?', '-h', '--help']))
......@@ -56,7 +62,6 @@ def main():
#sets up basic environment variables required everywhere
from ..constants import CACERT
from ..bootstrap import set_environment
set_environment('SSL_CERT_FILE', CACERT, os.environ)
set_environment('REQUESTS_CA_BUNDLE', CACERT, os.environ)
......@@ -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)
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)
# setup BOB_DOCUMENTATION_SERVER environment variable (used for bob.extension
......
......@@ -246,8 +246,6 @@ def build(dry_run):
pyver = os.environ['PYTHON_VERSION']
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)
# get information about the version of the package being built
......
......@@ -122,8 +122,6 @@ def create(name, recipe_dir, python, overwrite, condarc, use_local, config,
# set some environment variables before continuing
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:
logger.info('Loading CONDARC file from %s...', condarc)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment