diff --git a/maturin/__main__.py b/maturin/__main__.py index db5e84fb1..61250910a 100644 --- a/maturin/__main__.py +++ b/maturin/__main__.py @@ -41,4 +41,10 @@ def script_exists(dir: str) -> bool: print("Unable to find `maturin` script") exit(1) - os.execv(maturin, [str(maturin)] + sys.argv[1:]) + if sys.platform == "win32": + import subprocess + + code = subprocess.call([str(maturin)] + sys.argv[1:]) + sys.exit(code) + else: + os.execv(maturin, [str(maturin)] + sys.argv[1:])