Skip to content

Commit dd8060d

Browse files
committed
setup.py: Detect if libuv submodule has not been checked out
1 parent ba25d8b commit dd8060d

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,17 @@ def _libuv_build_env():
4040

4141

4242
def _libuv_autogen(env):
43-
if not os.path.exists(os.path.join(LIBUV_DIR, 'configure')):
44-
subprocess.run(
45-
['/bin/sh', 'autogen.sh'], cwd=LIBUV_DIR, env=env, check=True)
43+
if os.path.exists(os.path.join(LIBUV_DIR, 'configure')):
44+
# No need to use autogen, the configure script is there.
45+
return
46+
47+
if not os.path.exists(os.path.join(LIBUV_DIR, 'autogen.sh')):
48+
raise RuntimeError(
49+
'the libuv submodule has not been checked out; '
50+
'try running "git submodule init; git submodule update"')
51+
52+
subprocess.run(
53+
['/bin/sh', 'autogen.sh'], cwd=LIBUV_DIR, env=env, check=True)
4654

4755

4856
class uvloop_sdist(sdist):

0 commit comments

Comments
 (0)