mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
Revert "Clean up Python debugger binaries Gradle build script"
This reverts commit 1dd84585 GitOrigin-RevId: 25534910ece923388949e1c238dbf0ab8db7b2dd
This commit is contained in:
committed by
intellij-monorepo-bot
parent
5d66ea832c
commit
cb32406d51
@@ -23,7 +23,7 @@ envs {
|
||||
String python39version = "3.9.0"
|
||||
|
||||
def customBuildDir = System.getenv().get("PYCHARM_BUILD_DIR")
|
||||
project.buildDir = customBuildDir ? new File(customBuildDir) : buildDir
|
||||
project.buildDir = customBuildDir? new File(customBuildDir): buildDir
|
||||
bootstrapDirectory = new File(buildDir, 'pythons')
|
||||
envsDirectory = new File(buildDir, 'envs')
|
||||
|
||||
@@ -104,14 +104,12 @@ task buildBinaries() {
|
||||
task checkVersionOfCFiles() {
|
||||
description "Checks if the binary version in C files matches the regular version."
|
||||
doLast {
|
||||
File additionalThreadInfoRegular =
|
||||
Paths.get(project.ext.pydevDir.path, "_pydevd_bundle", "pydevd_additional_thread_info_regular.py").toFile()
|
||||
File additionalThreadInfoRegular = Paths.get(project.ext.pydevDir.path, "_pydevd_bundle", "pydevd_additional_thread_info_regular.py").toFile()
|
||||
File cFile = Paths.get(project.ext.pydevDir.path, "_pydevd_bundle", "pydevd_cython.c").toFile()
|
||||
Integer regularVersion = extractVersion(additionalThreadInfoRegular, ~/version = (\d+)/)
|
||||
Integer cVersion = extractVersion(cFile, ~/\s+version = (\d+)/)
|
||||
assert
|
||||
regularVersion == cVersion: "The version '$regularVersion' in ${additionalThreadInfoRegular.name} does not matches the '$cVersion' " +
|
||||
"version in ${cFile.name}"
|
||||
assert regularVersion == cVersion : "The version '$regularVersion' in ${additionalThreadInfoRegular.name} does not matches the '$cVersion' " +
|
||||
"version in ${cFile.name}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +133,7 @@ task checkCFilesAreUpToDate() {
|
||||
File cFile = Paths.get(pydevdRoot, dir, extName + ".c").toFile()
|
||||
|
||||
def checkTimespamps = { File mainFile, File dependentFile ->
|
||||
assert dependentFile.lastModified() > mainFile.lastModified(): "${dependentFile.name} is older than ${mainFile.name}"
|
||||
assert dependentFile.lastModified() > mainFile.lastModified() : "${dependentFile.name} is older than ${mainFile.name}"
|
||||
}
|
||||
|
||||
checkTimespamps(pxdFile, cFile)
|
||||
@@ -147,7 +145,7 @@ task checkCFilesAreUpToDate() {
|
||||
}
|
||||
|
||||
Integer extractVersion(File file, Pattern versionPattern) {
|
||||
file.withReader { reader ->
|
||||
file.withReader {reader ->
|
||||
def line
|
||||
while ((line = reader.readLine()) != null) {
|
||||
def matcher = line =~ versionPattern
|
||||
|
||||
Reference in New Issue
Block a user