diff --git a/python/build/python_plugin_build.gant b/python/build/python_plugin_build.gant
index 5b24d78089e1..5d50648ac6a7 100644
--- a/python/build/python_plugin_build.gant
+++ b/python/build/python_plugin_build.gant
@@ -172,6 +172,19 @@ target(name: "compile", description: "Compile module python") {
fileset(file: "${pluginHome}/build/python-plugin-dependencies.xml")
}
+ // set version to PyCharm current version from ApplicationInfo.xml
+ ant.loadfile(property: "appInfo", srcFile: "${home}/python/resources/idea/PyCharmCoreApplicationInfo.xml") {
+ }
+
+ major = ("${appInfo}" =~ /major\s*=\s*\"([^"])\"/)[0][1]
+ minor = ("${appInfo}" =~ /minor\s*=\s*\"([^"])\"/)[0][1]
+
+
+ ant.replaceregexp(file: path,
+ match: "@@PYCHARM_VERSION@@",
+ replace: "${major}.${minor}")
+
+ // set since-build to the current idea build number
ant.replace(file: "${classesDir}/META-INF/plugin.xml") {
replacefilter(token: "@@BUILD_NUMBER@@", value: "${buildNumber}")
}
diff --git a/python/pluginResources/META-INF/plugin.xml b/python/pluginResources/META-INF/plugin.xml
index c75e264faf5a..92421ad0cc2d 100644
--- a/python/pluginResources/META-INF/plugin.xml
+++ b/python/pluginResources/META-INF/plugin.xml
@@ -16,7 +16,7 @@ The Python plug-in provides smart editing for Python scripts. The feature set of
]]>
- 4.1 @@BUILD_NUMBER@@ EAP
+ @@PYCHARM_VERSION@@ @@BUILD_NUMBER@@ EAP
com.intellij.modules.java