Skip to content

Commit 3af0279

Browse files
committed
Fix
1 parent 331aa64 commit 3af0279

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3174,9 +3174,13 @@ class BeamModulePlugin implements Plugin<Project> {
31743174
packages += ",${extra}"
31753175
}
31763176

3177+
def pythonSdkDir = project.project(":sdks:python").projectDir
3178+
def constraintsFile = "${pythonSdkDir}/constraints.txt"
3179+
def constraintFlag = project.file(constraintsFile).exists() ? "-c ${constraintsFile}" : ""
3180+
def pipCmd = ". ${project.ext.envdir}/bin/activate && pip install --pre --retries 10 ${constraintFlag} ${distTarBall}[${packages}]".replaceAll(/ +/, ' ').trim()
31773181
project.exec {
31783182
executable 'sh'
3179-
args '-c', ". ${project.ext.envdir}/bin/activate && pip install --pre --retries 10 ${distTarBall}[${packages}]"
3183+
args '-c', pipCmd
31803184
}
31813185
}
31823186
}

0 commit comments

Comments
 (0)