You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-commits@lucene.apache.org by va...@apache.org on 2020/11/28 02:43:37 UTC
svn commit: r1883884 - /lucene/pylucene/trunk/jcc/jcc2/cpp.py
Author: vajda
Date: Sat Nov 28 02:43:36 2020
New Revision: 1883884
URL: http://svn.apache.org/viewvc?rev=1883884&view=rev
Log:
no longer using addClassPath from --import
Modified:
lucene/pylucene/trunk/jcc/jcc2/cpp.py
Modified: lucene/pylucene/trunk/jcc/jcc2/cpp.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/jcc/jcc2/cpp.py?rev=1883884&r1=1883883&r2=1883884&view=diff
==============================================================================
--- lucene/pylucene/trunk/jcc/jcc2/cpp.py (original)
+++ lucene/pylucene/trunk/jcc/jcc2/cpp.py Sat Nov 28 02:43:36 2020
@@ -610,17 +610,20 @@ def jcc(args):
initvm_args['maxstack'] = '512k'
initvm_args['vmargs'] = vmargs
- env = initVM(os.pathsep.join(classpath) or None, **initvm_args)
-
- typeset = set()
- excludes = set(excludes)
-
if imports:
if shared:
imports = dict((__import__(import_), set()) for import_ in imports)
else:
raise ValueError, "--shared must be used when using --import"
+ for import_ in imports.iterkeys():
+ classpath.append(import_.CLASSPATH)
+
+ env = initVM(os.pathsep.join(classpath) or None, **initvm_args)
+
+ typeset = set()
+ excludes = set(excludes)
+
if recompile or not build and (install or dist or egg_info):
if moduleName is None:
raise ValueError, 'module name not specified (use --python)'
@@ -642,7 +645,6 @@ def jcc(args):
className = className.replace(os.path.sep, '/')
importset.add(findClass(className))
for import_, importset in imports.iteritems():
- env._addClassPath(import_.CLASSPATH)
include = os.path.join(import_.__dir__, 'include')
os.path.walk(include, walk, (include, importset))
typeset.update(importset)