Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

LUCENE-4612: tell python not to write bytecode to the filesystem

Michael McCandless75f15cbb84c6
diff --git a/build.xml b/build.xml
index 686dec86dfd..026a20377bf 100644
--- a/build.xml
+++ b/build.xml
@@ -287,6 +287,8 @@
<makeurl file="${fakeRelease}" validate="false" property="fakeRelease.uri"/>
<exec executable="${python32.exe}" failonerror="true">
<arg value="-u"/>
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg file="dev-tools/scripts/smokeTestRelease.py"/>
<arg value="${fakeRelease.uri}"/>
<arg value="${fakeReleaseVersion}"/>
diff --git a/lucene/analysis/common/build.xml b/lucene/analysis/common/build.xml
index dadf374bc14..d9f4889caaa 100644
--- a/lucene/analysis/common/build.xml
+++ b/lucene/analysis/common/build.xml
@@ -59,6 +59,8 @@
<exec dir="src/java/org/apache/lucene/analysis/charfilter"
output="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex"
executable="${python.exe}" failonerror="true" logerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="htmlentity.py"/>
</exec>
<fixcrlf file="src/java/org/apache/lucene/analysis/charfilter/HTMLCharacterEntities.jflex" encoding="UTF-8"/>
diff --git a/lucene/common-build.xml b/lucene/common-build.xml
index db392366103..a4a1a8461fd 100644
--- a/lucene/common-build.xml
+++ b/lucene/common-build.xml
@@ -1959,6 +1959,8 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
<attribute name="dir"/>
<sequential>
<exec dir="." executable="${python32.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="${dev-tools.dir}/scripts/checkJavadocLinks.py"/>
<arg value="@{dir}"/>
</exec>
@@ -1970,6 +1972,8 @@ ${tests-output}/junit4-*.suites - per-JVM executed suites
<attribute name="level" default="class"/>
<sequential>
<exec dir="." executable="${python32.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="${dev-tools.dir}/scripts/checkJavaDocs.py"/>
<arg value="@{dir}"/>
<arg value="@{level}"/>
diff --git a/lucene/core/build.xml b/lucene/core/build.xml
index b1cf731bbec..2e72431a993 100644
--- a/lucene/core/build.xml
+++ b/lucene/core/build.xml
@@ -63,12 +63,16 @@
<sequential>
<exec dir="src/java/org/apache/lucene/util/automaton"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="createLevAutomata.py"/>
<arg value="@{n}"/>
<arg value="True"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/automaton"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="createLevAutomata.py"/>
<arg value="@{n}"/>
<arg value="False"/>
@@ -80,18 +84,26 @@
<target name="createPackedIntSources">
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="gen_BulkOperation.py"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="gen_Direct.py"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="gen_Packed64SingleBlock.py"/>
</exec>
<exec dir="src/java/org/apache/lucene/util/packed"
executable="${python.exe}" failonerror="true">
+ <!-- Tell Python not to write any bytecode cache into the filesystem: -->
+ <arg value="-B"/>
<arg value="gen_PackedThreeBlocks.py"/>
</exec>
<fixcrlf srcdir="src/java/org/apache/lucene/util/packed" includes="BulkOperation*.java,Direct*.java,Packed64SingleBlock.java,Packed*ThreeBlocks.py" encoding="UTF-8"/>