fix working with path on windows
@@ -30,15 +30,19 @@ subprocess.check_call(["cargo", "test"], cwd=str(os.path.join(os.path.abspath('.
subprocess.check_call(["cargo", "test"], shell=False)
subprocess.check_call(["cargo", "build"], shell=False)
+#becuase of http://bugs.python.org/issue17023
+use_shell = os.name == 'nt'
+
java_dir = str(os.path.join(os.getcwd(), "src/com/example"))
purge(java_dir, ".*\.class$")
subprocess.check_call(["javac", "Main.java", "Foo.java", "Boo.java", "TestPathAndResult.java", "TestInner.java"],
- cwd=java_dir, shell=False)
+ cwd=java_dir, shell=use_shell)
jar_dir = str(os.path.join(os.getcwd(), "src"))
purge(java_dir, ".*\.jar$")
-subprocess.check_call(["jar", "cfv", "Test.jar", "com"], cwd=jar_dir, shell=False)
+subprocess.check_call(["jar", "cfv", "Test.jar", "com"], cwd=jar_dir, shell=use_shell)
target_dir = os.path.join(find_dir("target"), "debug")
-subprocess.check_call(["java", "-verbose:jni", "-ea", "-Djava.library.path=" + target_dir, "-cp", "Test.jar", "com.example.Main"], cwd=jar_dir, shell=False)
+subprocess.check_call(["java", "-verbose:jni", "-ea", "-Djava.library.path=" + target_dir, "-cp", "Test.jar", "com.example.Main"],
+ cwd=jar_dir, shell=use_shell)
