[ https://issues.apache.org/jira/browse/PYLUCENE-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17182258#comment-17182258 ]
Andrea Sterbini commented on PYLUCENE-55: ----------------------------------------- What a beautiful solution! Thanks a lot for your help! Now it works, I had just to add the missing packages. There is even no need to --use-full-names My Makefile now looks like {code:java} // Makefile CPLUS_INCLUDE_PATH:=/opt/anaconda3/envs/MLC/include:/opt/anaconda3/envs/MLC/include/linux PREFIX_PYTHON=/opt/anaconda3/envs/MLC PYTHON=$(PREFIX_PYTHON)/bin/python JCC=CPLUS_INCLUDE_PATH=$(CPLUS_INCLUDE_PATH) $(PYTHON) -m jcc --shared --arch x86_64 --wheel NUM_FILES=10 JARS= --jar babelnet-api-4.0.1.jar JARS+= --jar lib/babelscape-data-commons-1.0.jar INCLUDE+=--include lib/commons-beanutils-1.7.0.jar INCLUDE+=--include lib/commons-beanutils-core-1.7.0.jar INCLUDE+=--include lib/commons-codec-1.8.jar INCLUDE+=--include lib/commons-collections-3.2.jar INCLUDE+=--include lib/commons-configuration-1.5.jar INCLUDE+=--include lib/commons-digester-1.8.jar INCLUDE+=--include lib/commons-lang-2.3.jar INCLUDE+=--include lib/commons-logging-1.1.jar INCLUDE+=--include lib/gson-2.8.2.jar INCLUDE+=--include lib/guava-23.0.jar INCLUDE+=--include lib/httpclient-4.3.6.jar INCLUDE+=--include lib/httpcore-4.3.3.jar INCLUDE+=--include lib/icu4j-56.1.jar INCLUDE+=--include lib/jwi-2.2.3.jar INCLUDE+=--include lib/lcl-jlt-2.4.jar INCLUDE+=--include lib/logback-classic-1.2.3.jar INCLUDE+=--include lib/logback-core-1.2.3.jar INCLUDE+=--include lib/lucene-analyzers-common-7.2.0.jar INCLUDE+=--include lib/lucene-core-7.2.0.jar INCLUDE+=--include lib/lucene-queries-7.2.0.jar INCLUDE+=--include lib/lucene-queryparser-7.2.0.jar INCLUDE+=--include lib/lucene-sandbox-7.2.0.jar INCLUDE+=--include lib/slf4j-api-1.7.25.jar PACKAGES+=--package it.uniroma1.lcl.babelnet PACKAGES+=--package it.uniroma1.lcl.jlt.util PACKAGES+=--package it.uniroma1.lcl.jlt PACKAGES+=--package com.babelscape PACKAGES+=--package com.babelscape.pipeline.annotation.maps PACKAGES+=--package com.babelscape.pipeline.annotation PACKAGES+=--package com.babelscape.pipeline PACKAGES+=--package java.util MAPPING= compile: $(JCC) $(INCLUDE) $(JARS) $(MAPPING) $(PACKAGES) --python babelnet --build --version 4.0.1 install: $(JCC) $(INCLUDE) $(JARS) $(MAPPING) $(PACKAGES) --python babelnet --install --version 4.0.1 {code} > JCC creates the classes in non-deterministic order > -------------------------------------------------- > > Key: PYLUCENE-55 > URL: https://issues.apache.org/jira/browse/PYLUCENE-55 > Project: PyLucene > Issue Type: Bug > Reporter: Andrea Sterbini > Priority: Major > > I am trying to wrap the BabelNet API code. > The resulting module is non-deterministically not-working (once every 5 I get > it OK). > This seems to be related to the order the classes are handled, because they > are kept in a set, which has nondeterministic order. > By changing cpp.py at line 696 to sort the class names I get a working module. > {code:java} > // changed from > for cls in todo: > {code} > {code:java} > // to > for cls in sorted(todo, key=lambda c: c.getName()):{code} > I have been luky with this way to order the classes. Possibly a better > algorithm exists to fix this bug. -- This message was sent by Atlassian Jira (v8.3.4#803005)