[ 
https://issues.apache.org/jira/browse/LUCENE-9230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038594#comment-17038594
 ] 

Robert Muir commented on LUCENE-9230:
-------------------------------------

Attached is a patch that may be incomplete, but fixes my problem. 

I also tested "ant regenerate" with lucene's core with {{ant regenerate}}, it 
fails without the patch as well:
{noformat}
think:core[master]$ ant regenerate
Buildfile: /home/rmuir/workspace/lucene-solr/lucene/core/build.xml

check-moman:

download-moman:

createLevAutomata:
     [exec]   File "createLevAutomata.py", line 96
     [exec]     print 'Usage: python -u %s N <True/False> path_to_moman_dir' % 
sys.argv[0]
     [exec]           ^
     [exec] SyntaxError: Missing parentheses in call to 'print'. Did you mean 
print('Usage: python -u %s N <True/False> path_to_moman_dir' % sys.argv[0])?

BUILD FAILED
/home/rmuir/workspace/lucene-solr/lucene/core/build.xml:112: The following 
error occurred while executing this line:
/home/rmuir/workspace/lucene-solr/lucene/core/build.xml:72: exec returned: 1

Total time: 0 seconds
{noformat}

With the patch it works correctly. I think most scripts are using python3 and 
this is just one of the stragglers.

> gradle moman fails on my machine, assumes python -> python2
> -----------------------------------------------------------
>
>                 Key: LUCENE-9230
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9230
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Robert Muir
>            Priority: Major
>         Attachments: LUCENE-9230.patch
>
>
> python2 is EOL and many distros are transitioning {{python}} to really invoke 
> python3. So the scripts fail on wrong syntax in such cases. This happens for 
> me if i try {{gradle moman}}.
> I think as a first step, we should explicitly call {{python2}} for any 
> python2 scripts, and {{python3}} for python3 scripts?
> cc [~mikemccand]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to