mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 21:11:28 +07:00
py env tests: always use cache on Windows because Py27.
Py27 can't be installed due to https://github.com/JetBrains/gradle-python-envs/issues/34, so we need to use cache in any case. But cache is only accessible from JB network (TODO: move cache to Space to make it available worldwide) so we fallback to the building process (which will fail for now) if cache server is not available GitOrigin-RevId: 4251a492ebfab7d8374aff27524ff928011ea374
This commit is contained in:
committed by
intellij-monorepo-bot
parent
dc4b614813
commit
69fa85f3a5
@@ -48,12 +48,26 @@ envs {
|
||||
bootstrapDirectory = new File(System.getenv().getOrDefault("PYCHARM_PYTHONS", new File(buildDir, 'pythons').path))
|
||||
envsDirectory = new File(System.getenv().getOrDefault("PYCHARM_PYTHON_VIRTUAL_ENVS", new File(buildDir, 'envs').path))
|
||||
|
||||
def djangoTrunkOnly = System.getProperty("djangoTrunkOnly") ?: false
|
||||
def djangoTrunkOnly = System.getProperty("djangoTrunkOnly") ?: false
|
||||
|
||||
if (System.getenv().containsKey("PYCHARM_ZIP_REPOSITORY")) {
|
||||
zipRepository = new URL(System.getenv().get("PYCHARM_ZIP_REPOSITORY"))
|
||||
shouldUseZipsFromRepository = isWindows
|
||||
|
||||
if (isWindows) {
|
||||
// On Windows you almost always want to use cache server except you are outside of JB
|
||||
def zipRepositoryURL = new URL(
|
||||
System.getenv().getOrDefault("PYCHARM_ZIP_REPOSITORY", "https://repo.labs.intellij.net/pycharm/python-archives-windows/"))
|
||||
try {
|
||||
zipRepositoryURL.getContent()
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
zipRepositoryURL = null
|
||||
System.err.println("Cache server is only accessible from JB network. Will try to build python from scratch. Use cache if possible")
|
||||
}
|
||||
if (zipRepositoryURL != null) {
|
||||
zipRepository = zipRepositoryURL
|
||||
shouldUseZipsFromRepository = true
|
||||
}
|
||||
}
|
||||
|
||||
Boolean shouldUseCondaInterpreters = System.getenv().getOrDefault("PYCHARM_USE_CONDA", "false").toBoolean()
|
||||
|
||||
Closure createPython = { String pythonName,
|
||||
|
||||
Reference in New Issue
Block a user