From 9454edfdc745226e2bf0aab8c4c8155a328f6cab Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Thu, 25 Aug 2011 18:59:32 +0400 Subject: [PATCH] Fixed default task. Removed *.pyc and *.class from egg. --- python/build/python_common.gant | 4 +++- python/build/python_plugin_build.gant | 17 +++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/python/build/python_common.gant b/python/build/python_common.gant index 475f4ed375ff..286ef4f64f05 100644 --- a/python/build/python_common.gant +++ b/python/build/python_common.gant @@ -6,7 +6,9 @@ binding.setVariable("buildDebuggerEgg", {String sandbox, String pythonHome, Stri ant.mkdir(dir: eggDir) ant.mkdir(dir:"$eggDir/pydev") ant.copy(todir: "$eggDir/pydev") { - fileset(dir: "$pythonHome/helpers/pydev") + fileset(dir: "$pythonHome/helpers/pydev") { + include(name: "**/*.py") + } } ant.mkdir(dir:"$eggDir/EGG-INFO") diff --git a/python/build/python_plugin_build.gant b/python/build/python_plugin_build.gant index f11bea298e2e..dd16b9b9aa90 100644 --- a/python/build/python_plugin_build.gant +++ b/python/build/python_plugin_build.gant @@ -1,6 +1,11 @@ -setProperty("basedir", "${ant.project.properties.basedir}/../python/build") +import org.jetbrains.jps.Jps +import static org.jetbrains.jps.idea.IdeaProjectLoader.guessHome -includeTargets << new File("${basedir}/python_common.gant") +includeTargets << new File("${guessHome(this as Script)}/community/build/scripts/utils.gant") +includeTargets << new File("${guessHome(this)}/python/build/python_common.gant") +includeTool << Jps + +setProperty("basedir", "${ant.project.properties.basedir}/../python/build") setProperty("projectHome", "${basedir}/../..") setProperty("outDir", "${projectHome}/out/python") @@ -9,7 +14,7 @@ setProperty("ideaHome", "${ideaDir}/jdk16") setProperty("pluginHelp", "${outDir}/help") -setProperty("buildNumber", "snapshot"); +setProperty("buildNumber", requireProperty("build.number", "108.SNAPSHOT")) setProperty("pluginHome", "${basedir}/..") setProperty("pluginRevision", "${buildNumber}") @@ -182,7 +187,7 @@ target(name: "zip", description: "Generate zip plugin file") { } ant.mkdir(dir: "${plugindir}/help") - ant.copy(file: "${pluginHelp}/pytonpluginhelp.jar", tofile: "${plugindir}/help/pythonpluginhelp.jar") + //ant.copy(file: "${pluginHelp}/pytonpluginhelp.jar", tofile: "${plugindir}/help/pythonpluginhelp.jar") ant.move(file: "${debugEgg}", todir: "${plugindir}") @@ -193,7 +198,7 @@ target(name: "build") { depends("clean") depends("unzip") depends("compile") - egg = buildDebuggerEgg(outDir, pluginHome, "Plugin-${buildNumber}") + egg = buildDebuggerEgg(outDir, pluginHome, "PythonPlugin-${buildNumber}") setProperty("debugEgg", "$egg") } @@ -209,5 +214,5 @@ target(name: "artifacts") { } target('default': "Build artifacts") { - depends("artifacts") + depends("dist") }