diff --git a/setup.py b/setup.py index ecde60debc5aabd4fde8873a2bd116a00860b4f5..36148f1eb32e595b488d75cd527e2036916c52ea 100644 --- a/setup.py +++ b/setup.py @@ -10,13 +10,14 @@ class prepare_tinydtls(build_ext): def run(self): def run_command(args): print("Running:", " ".join(args)) - subprocess.check_call(args, cwd=os.path.join(os.path.dirname(__file__), "./DTLSSocket/tinydtls")) + subprocess.check_call(args, cwd=os.path.join(os.path.dirname(__file__), "DTLSSocket','tinydtls")) commands = [ - ["git", "submodule", "update", "--init"], ["autoconf"], ["autoheader"], ["./configure", "--without-ecc"], ] + if not os.path.exists(os.path.join(os.path.dirname(__file__), 'DTLSSocket','tinydtls','dtls.c')): + ["git", "submodule", "update", "--init"], for command in commands: run_command(command) build_ext.run(self)