diff --git a/python/build/pycharm_build.gant b/python/build/pycharm_build.gant index 1fd9b971b769..d6230e015581 100644 --- a/python/build/pycharm_build.gant +++ b/python/build/pycharm_build.gant @@ -159,14 +159,14 @@ target('default': "Build artifacts") { signMacZip("pycharm") buildDmg("pycharm", "${home}/python/build/DMG_background.png") - communityEdition(usedJars) + communityEdition() } -private communityEdition(Set usedJars) { +private communityEdition() { Script s = groovyShell.parse(new File("$pythonCommunityHome/build/pycharm_community_build.gant")) s.setBinding(binding) - s.layoutCommunity("${paths.sandbox}/classes/production", usedJars) + s.layoutCommunity("${paths.sandbox}/classes/production", null) signExe("${paths.sandboxCE}/win/bin/pycharm.exe") buildNSIS(["${paths.sandboxCE}/layout", "${paths.sandboxCE}/win"], "$pythonCommunityHome/build/strings.nsi", "$pythonCommunityHome/build/paths.nsi", diff --git a/python/build/pycharm_community_build.gant b/python/build/pycharm_community_build.gant index b48dfadc9754..81b3d20bde7a 100644 --- a/python/build/pycharm_community_build.gant +++ b/python/build/pycharm_community_build.gant @@ -33,6 +33,18 @@ private List pycharmImplementationModules() { //modules to put into pycharm.ja "platform-main"].flatten() } +private List modules() { + return [ + "python-pydev", "colorSchemes", pycharmPlatformApiModules(), pycharmImplementationModules(), pluginFilter + ].flatten() +} + +private List approvedJars() { + def normalizedHome = ch.replace('\\', '/') + def normalizedPythonHome = pythonCommunityHome.replace('\\', '/') + return ["$normalizedHome/lib/", "$normalizedPythonHome/lib/", "$normalizedHome/xml/relaxng/lib/"] +} + class Paths { final sandbox final distAll @@ -61,9 +73,6 @@ setProperty("paths", new Paths(home)) setProperty("buildName", "PC-$buildNumber") target('default': "Build artifacts") { - def modules = [ - "python-pydev", "colorSchemes", pycharmPlatformApiModules(), pycharmImplementationModules(), pluginFilter - ].flatten() loadProject() @@ -104,10 +113,7 @@ target('default': "Build artifacts") { zipSources(home, paths.artifacts) - def normalizedHome = ch.replace('\\', '/') - def normalizedPythonHome = pythonCommunityHome.replace('\\', '/') - def approvedJars = ["$normalizedHome/lib/", "$normalizedPythonHome/lib/", "$normalizedHome/xml/relaxng/lib/"] - def usedJars = buildModulesAndCollectUsedJars(modules, approvedJars, ["/ant/"]) + def usedJars = buildModulesAndCollectUsedJars(modules(), approvedJars(), ["/ant/"]) layoutCommunity("${paths.sandbox}/classes/production", usedJars) @@ -126,6 +132,12 @@ target('default': "Build artifacts") { } public layoutCommunity(String classesPath, Set usedJars) { + setProperty("pluginFilter", new File("$pythonCommunityHome/build/plugin-list.txt").readLines()) + + if (usedJars == null) { + usedJars = collectUsedJars(modules(), approvedJars(), ["/ant/"], null) + } + def appInfo = appInfoFile(classesPath) def paths = new Paths(home) buildSearchableOptions("${projectBuilder.moduleOutput(findModule("platform-resources"))}/search", [], {