Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default Python 3 interpreter, when precise minor version is not specified to gradle. #31282

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ class BeamModulePlugin implements Plugin<Project> {
//
// Consider migrating compilation and testing to use JDK 9+ and setting '--release 8' as
// the default allowing 'applyJavaNature' to override it for the few modules that need JDK 9+
// artifacts. See https://stackoverflow.com/a/43103038/4368200 for additional details.
// artifacts. See https://stackoverflow.com/a/43103038/468200 for additional details.
tvalentyn marked this conversation as resolved.
Show resolved Hide resolved
if (JavaVersion.VERSION_1_8.compareTo(JavaVersion.toVersion(project.javaVersion)) == 0
&& JavaVersion.VERSION_1_8.compareTo(JavaVersion.current()) < 0) {
options.compilerArgs += ['--release', '8']
Expand Down Expand Up @@ -2949,12 +2949,11 @@ class BeamModulePlugin implements Plugin<Project> {
project.ext.envdir = "${project.rootProject.buildDir}/gradleenv/${project.path.hashCode()}"
def pythonRootDir = "${project.rootDir}/sdks/python"

// Python interpreter version for virtualenv setup and test run. This value can be
// set from commandline with -PpythonVersion, or in build script of certain project.
// If none of them applied, version set here will be used as default value.
// TODO(BEAM-12000): Move default value to Py3.9.
// Python interpreter to use to create the venv. This value can be
// set from commandline with -PpythonVersion, or in build script of a certain project.
// If none of them applied, default python3 interpreter availabe in the envrionment will be used.
project.ext.pythonVersion = project.hasProperty('pythonVersion') ?
project.pythonVersion : '3.8'
project.pythonVersion : '3'

def setupVirtualenv = project.tasks.register('setupVirtualenv') {
doLast {
Expand Down
Loading