From 575662c4b9ff2334e6092f7aa8326a5899fa4ea2 Mon Sep 17 00:00:00 2001 From: Dmitry Trofimov Date: Tue, 7 Dec 2010 21:36:15 +0300 Subject: [PATCH] added debugger egg --- python/build/pycharm_build.gant | 96 +++++++++++++++++------------ python/helpers/pydev/pydevd_comm.py | 2 +- 2 files changed, 59 insertions(+), 39 deletions(-) diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index a0bcad7452c9..6287fc812fb3 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -13,23 +13,23 @@ setProperty("jdk16", guessJdk()) setProperty("vmoptions", "-Xms128m -Xmx512m -XX:MaxPermSize=150m -ea") setProperty("pluginFilter", [ - "htmltools", - "JavaScriptLanguage", - "cvsIntegration", "cvs-core", "cvs-plugin", "javacvs-src", "smartcvs-src", - "PerforceIntegration", "Perforce", "perforce_util", - "svn4idea", - "git4idea", - "CSS", "css-api", - "JSInspections", - "JSIntentionPowerPack", - "SpellChecker", "spellchecker", - "sass", "less", - "hg4idea", - "tasks", "tasks-core", "tasks-api", "jira-connector", - "github", - "python-spellchecker-common", "pycharm-spellchecker", - "webDeployment" -]) + "htmltools", + "JavaScriptLanguage", + "cvsIntegration", "cvs-core", "cvs-plugin", "javacvs-src", "smartcvs-src", + "PerforceIntegration", "Perforce", "perforce_util", + "svn4idea", + "git4idea", + "CSS", "css-api", + "JSInspections", + "JSIntentionPowerPack", + "SpellChecker", "spellchecker", + "sass", "less", + "hg4idea", + "tasks", "tasks-core", "tasks-api", "jira-connector", + "github", + "python-spellchecker-common", "pycharm-spellchecker", + "webDeployment" + ]) private List platformImplementationModules() { return [ @@ -102,27 +102,47 @@ def zipSources() { ant.mkdir(dir: paths.artifacts) ant.delete(file: sources) - ant.zip (destfile: sources) { - fileset (dir: home) { + ant.zip(destfile: sources) { + fileset(dir: home) { ["java", "ipr", "iml", "form", "xml", "properties"].each { - include (name: "**/*.$it") + include(name: "**/*.$it") } - exclude (name: "**/testData/**") + exclude(name: "**/testData/**") } } } +def buildDebuggerEgg(paths, buildName) { + def eggDir = "$paths.sandbox/pycharm-debug" + def egg = "$paths.sandbox/pycharm-debug.egg" + project.stage("building $egg") + + ant.delete(dir: eggDir) + ant.mkdir(dir: eggDir) + ant.copy(todir: eggDir) { + fileset(dir: "$home/python/helpers/pydev") + fileset(dir: "$home/python/resources/debugger-egg/EGG-INFO") + } + ant.replace(file: "$eggDir/EGG-INFO/PKG-INFO") { + replacefilter(token: "@@BUILD_NUMBER@@", value: buildName) + } + ant.zip(destfile: egg) { + fileset(dir: eggDir) + } + ant.copy(file: egg, todir: paths.distAll) +} + target('default': "Build artifacts") { def modules = [ "python", "python-ide", "python-pydev", platformApiModules(), platformImplementationModules(), pluginFilter ].flatten() - + loadProject() // project.dryRun = true project.stage("Cleaning up sandbox folder") - + project.targetFolder = "$sandbox/classes" project.dryRun = dryRun @@ -131,7 +151,6 @@ target('default': "Build artifacts") { ant.mkdir(dir: sandbox) } - ant.tstamp() { format(property: "today.year", pattern: "yyyy") } @@ -201,6 +220,7 @@ target('default': "Build artifacts") { build_searchable_options() wire_build_date(buildName) layoutFull(paths.distAll, usedJars) + buildDebuggerEgg(paths, buildName) scramble() layoutWin(paths.distWin) @@ -213,7 +233,7 @@ target('default': "Build artifacts") { paths.distMac) buildExe() - + ant.echo(message: buildName, file: "$sandbox/layout/build.txt") def root = isEap ? "PyCharm-${buildNumber}.app" : "PyCharm ${p("component.version.major")}.${p("component.version.minor")}.app" @@ -231,7 +251,7 @@ target('default': "Build artifacts") { } executeExternalAnt("file.name": "pycharm", "$home/build/buildDmg.xml") - + buildTarGz() def installer = includeFile("$home/build/scripts/nsis_installer.gant") @@ -242,7 +262,7 @@ target('default': "Build artifacts") { } def build_searchable_options() { - def dest_dir = "${project ["platform-resources"].output}/search" + def dest_dir = "${project["platform-resources"].output}/search" project.stage("Building searchable options") ant.mkdir(dir: "${dest_dir}/search") ant.copy(file: "$home/build/idea.license", todir: paths.ideaSystem) @@ -475,8 +495,8 @@ def layoutFull(String target, Set usedJars) { } ant.echo(file: "$target/bin/idea.properties", append: "true", message: - isEap() ? -""" + isEap() ? + """ #----------------------------------------------------------------------- # Change to 'disabled' if you do not need to receive instant visual @@ -485,8 +505,8 @@ def layoutFull(String target, Set usedJars) { idea.fatal.error.notification=enabled """ - : -""" + : + """ #----------------------------------------------------------------------- # Change to 'enabled' if you need to receive instant visual notifications about @@ -549,7 +569,7 @@ def layoutWin(String target) { exclude(name: "breakgen*") exclude(name: "idea.bat") include(name: "runnerw.exe") - + } fileset(dir: "$home/python/build") { include(name: "pycharm.bat") @@ -557,7 +577,7 @@ def layoutWin(String target) { } } ant.copy(file: "$home/python/help/pycharmhelp.jar", todir: "$target/help") - ant.echo(file: "$target/bin/pycharm.exe.vmoptions", message: vmoptions.replace(' ', '\n') ) + ant.echo(file: "$target/bin/pycharm.exe.vmoptions", message: vmoptions.replace(' ', '\n')) } def layoutUnix(String target) { @@ -595,16 +615,16 @@ def executeExternalAnt(Map args, String file) { classpath { fileset(dir: "$home/build/lib") { - include (name: "commons-net-1.4.1.jar") - include (name: "jsch-0.1.43.jar") + include(name: "commons-net-1.4.1.jar") + include(name: "jsch-0.1.43.jar") } fileset(dir: "$ch/lib/ant/lib") { - include (name: "*.jar") + include(name: "*.jar") } - fileset (file: "$jdk16/lib/tools.jar") - fileset (file: "$ch/lib/oromatcher.jar") + fileset(file: "$jdk16/lib/tools.jar") + fileset(file: "$ch/lib/oromatcher.jar") } arg(value: "-f") diff --git a/python/helpers/pydev/pydevd_comm.py b/python/helpers/pydev/pydevd_comm.py index 2ed09dd022c4..d141297100de 100644 --- a/python/helpers/pydev/pydevd_comm.py +++ b/python/helpers/pydev/pydevd_comm.py @@ -140,7 +140,7 @@ ID_TO_MEANING = { MAX_IO_MSG_SIZE = 1000 #if the io is too big, we'll not send all (could make the debugger too non-responsive) #this number can be changed if there's need to do so -VERSION_STRING = "1.1" +VERSION_STRING = "PYCHARM-1.1" #--------------------------------------------------------------------------------------------------- UTILITIES