Add a Linux implementation of environment

This commit is contained in:
Joe Rickerby
2017-07-24 22:39:37 +01:00
parent 38f89e955f
commit 6aba5f81f1
2 changed files with 18 additions and 2 deletions
+6 -1
View File
@@ -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([