Skip to content

Commit 2dbb637

Browse files
cmcqueen1st1
authored andcommitted
Allow for cross-compile of libuv (#114)
If LIBUV_CONFIGURE_HOST environment variable is defined, then call ./configure with --host parameter set to LIBUV_CONFIGURE_HOST value.
1 parent 943c0db commit 2dbb637

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,12 @@ def build_libuv(self):
233233
'Makefile.am', 'Makefile.in'],
234234
cwd=LIBUV_BUILD_DIR, env=env, check=True)
235235

236+
if 'LIBUV_CONFIGURE_HOST' in env:
237+
cmd = ['./configure', '--host=' + env['LIBUV_CONFIGURE_HOST']]
238+
else:
239+
cmd = ['./configure']
236240
subprocess.run(
237-
['./configure'],
241+
cmd,
238242
cwd=LIBUV_BUILD_DIR, env=env, check=True)
239243

240244
j_flag = '-j{}'.format(os.cpu_count() or 1)

0 commit comments

Comments
 (0)