You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Peter Barna <pe...@gmail.com> on 2015/09/16 18:43:07 UTC

ant precommit issue on windows 8

I am currently working on LUCENE-6807, and realized that even though I had
already built a patch, I had not run the precommit script to make sure it
was up to standards.

When I run ant precommit, I get the following output:

BUILD FAILED
C:\Users\Peter\workspace\lucene-core\build.xml:101: The following error
occurred while executing this line:
C:\Users\Peter\workspace\lucene-core\lucene\build.xml:137: The following
error occurred while executing this line:
C:\Users\Peter\workspace\lucene-core\lucene\build.xml:150: The following
error occurred while executing this line:
C:\Users\Peter\workspace\lucene-core\lucene\common-build.xml:2489: Execute
failed: java.io.IOException: Cannot run program "python3" (in directory
"C:\Users\Peter\workspace\lucene-core\lucene"): CreateProcess error=2, The
system cannot find the file specified

I have python3 installed in cygwin, and it is on my PATH:

[Peter@Pete-pc lucene]$ pwd
/cygdrive/c/Users/Peter/workspace/lucene-core/lucene
[Peter@Pete-pc lucene]$ which python3
/usr/bin/python3

When this did not work, I read the documentation for ant exec (
https://ant.apache.org/manual/Tasks/exec.html) and saw that programs
installed in the cygwin filesystem might not be recognized, so I installed
python 3 on the windows filesystem, and renamed python.exe to python3.exe.
In the windows shell:

C:\Users\Peter\workspace\lucene-core\lucene>where python3
C:\Python30\python3.exe

However ant precommit still tells me the same thing.
Does anyone have any suggestions?