Commit d98f1ab5 authored by Jason Madden's avatar Jason Madden

actually pass the environement

parent b67c63dd
...@@ -70,7 +70,7 @@ def prepare_windows_env(env): ...@@ -70,7 +70,7 @@ def prepare_windows_env(env):
# Try if `python` on PATH is the right one. If we would execute # Try if `python` on PATH is the right one. If we would execute
# `python` directly the current executable might be used so we # `python` directly the current executable might be used so we
# delegate this to cmd. # delegate this to cmd.
cmd = ['cmd.exe', '/C', 'python', '-c', 'import sys; ' cmd = ['cmd.exe', '/C', 'python', '-c', 'import sys; '
'v = str(sys.version_info[:2]); sys.stdout.write(v); ' 'v = str(sys.version_info[:2]); sys.stdout.write(v); '
'sys.stdout.flush()'] 'sys.stdout.flush()']
try: try:
...@@ -118,7 +118,10 @@ def configure_libuv(_bext, _ext): ...@@ -118,7 +118,10 @@ def configure_libuv(_bext, _ext):
def build_libuv(): def build_libuv():
cflags = '-fPIC' cflags = '-fPIC'
env = os.environ.copy() env = os.environ.copy()
env['CFLAGS'] = ' '.join(x for x in (cflags, env.get('CFLAGS', None), env.get('ARCHFLAGS', None)) if x) env['CFLAGS'] = ' '.join(x for x in (cflags,
env.get('CFLAGS', None),
env.get('ARCHFLAGS', None))
if x)
# Since we're building a static library, if link-time-optimization is requested, it # Since we're building a static library, if link-time-optimization is requested, it
# results in failure to properly create the library archive. This goes unnoticed on # results in failure to properly create the library archive. This goes unnoticed on
# OS X until import time because of '-undefined dynamic_lookup'. On the raspberry # OS X until import time because of '-undefined dynamic_lookup'. On the raspberry
...@@ -126,7 +129,7 @@ def configure_libuv(_bext, _ext): ...@@ -126,7 +129,7 @@ def configure_libuv(_bext, _ext):
if '-flto' in env['CFLAGS']: if '-flto' in env['CFLAGS']:
log.info("Removing LTO") log.info("Removing LTO")
env['CFLAGS'] = env['CFLAGS'].replace('-flto', '') env['CFLAGS'] = env['CFLAGS'].replace('-flto', '')
log.info('Building libuv...') log.info('Building libuv with cflags %s', env['CFLAGS'])
if WIN: if WIN:
prepare_windows_env(env) prepare_windows_env(env)
libuv_arch = {'32bit': 'x86', '64bit': 'x64'}[platform.architecture()[0]] libuv_arch = {'32bit': 'x86', '64bit': 'x64'}[platform.architecture()[0]]
......
...@@ -134,7 +134,7 @@ def _system(cmd, cwd=None, env=None): ...@@ -134,7 +134,7 @@ def _system(cmd, cwd=None, env=None):
def system(cmd, cwd=None, env=None): def system(cmd, cwd=None, env=None):
if _system(cmd, cwd=cwd, env=None): if _system(cmd, cwd=cwd, env=env):
sys.exit(1) sys.exit(1)
......
@echo off @rem @echo off
cd %~dp0 cd %~dp0
......
Markdown is supported
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