Add a Linux implementation of environment
This commit is contained in:
@@ -9,7 +9,7 @@ except ImportError:
|
||||
from pipes import quote as shlex_quote
|
||||
|
||||
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip):
|
||||
def build(project_dir, package_name, output_dir, test_command, test_requires, before_build, skip, environment):
|
||||
try:
|
||||
subprocess.check_call(['docker', '--version'])
|
||||
except:
|
||||
@@ -52,6 +52,8 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
||||
set -o xtrace
|
||||
cd /project
|
||||
|
||||
{environment_exports}
|
||||
|
||||
for PYBIN in {pybin_paths}; do
|
||||
# Setup
|
||||
rm -rf /tmp/built_wheel
|
||||
@@ -106,6 +108,9 @@ def build(project_dir, package_name, output_dir, test_command, test_requires, be
|
||||
before_build=shlex_quote(
|
||||
prepare_command(before_build, python='python', pip='pip') if before_build else ''
|
||||
),
|
||||
environment_exports=' '.join(
|
||||
('export %s=%s\n' % (key, shlex_quote(value)) for key, value in environment.items())
|
||||
),
|
||||
)
|
||||
|
||||
docker_process = subprocess.Popen([
|
||||
|
||||
Reference in New Issue
Block a user