use of com.jetbrains.python.envs.PythonEnvsExtension in project curiostack by curioswitch.
the class CuriostackPlugin method setupPyenvs.
private static void setupPyenvs(Project rootProject) {
PythonEnvsExtension envs = rootProject.getExtensions().getByType(PythonEnvsExtension.class);
Path pythonDir = CommandUtil.getPythonDir(rootProject);
envs.setBootstrapDirectory(pythonDir.resolve("bootstrap").toFile());
envs.setEnvsDirectory(pythonDir.resolve("envs").toFile());
ImmutableList.Builder<String> condaPackages = ImmutableList.<String>builder().add("git").add("automake").add("autoconf").add("make");
if (Os.isFamily(Os.FAMILY_MAC)) {
condaPackages.add("clang_osx-64", "clangxx_osx-64", "gfortran_osx-64");
} else if (Os.isFamily(Os.FAMILY_UNIX)) {
condaPackages.add("gcc_linux-64", "gxx_linux-64", "gfortran_linux-64");
}
envs.conda("miniconda2", "Miniconda2-4.4.10", condaPackages.build().stream().map(envs::condaPackage).collect(toImmutableList()));
envs.condaenv("build", "2.7", "miniconda2");
envs.condaenv("dev", "2.7", "miniconda2");
rootProject.getTasks().create("pythonSetup", t -> t.dependsOn("build_envs"));
}
Aggregations