[
https://issues.apache.org/jira/browse/BEAM-6024?focusedWorklogId=184293&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-184293
]
ASF GitHub Bot logged work on BEAM-6024:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Jan/19 18:37
Start Date: 11/Jan/19 18:37
Worklog Time Spent: 10m
Work Description: tvalentyn commented on pull request #7423: [BEAM-6024]
Build Python 3 container image with Gradle
URL: https://github.com/apache/beam/pull/7423#discussion_r247209615
##########
File path:
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
##########
@@ -1523,7 +1523,14 @@ artifactId=${project.name}
project.task('setupVirtualenv') {
doLast {
- project.exec { commandLine 'virtualenv', "${project.ext.envdir}" }
+ def virtualenvCmd = [
+ 'virtualenv',
+ "${project.ext.envdir}",
+ ]
+ if (project.hasProperty('python3')) {
+ virtualenvCmd += '--python=python3'
Review comment:
In the future, I'd like us to be able to customize which Python 3 version to
use (3.5, 3.6, etc). Dockerfile can take an argument for the FROM clause as
well. This can happen in the future PR, but for the scope of this PR I'd like
to make sure that we use the same Python 3 version to build the SDK as we use
in the Dockerfile. So we I think should pass `--python=python3.5`, but we could
make this a constant somewhere up in the file and make a note that the version
should match the version we [inside the Docker
container](https://github.com/apache/beam/blob/3a531323322b3f5bbd695b64744a0603a1c97607/sdks/python/container/py3/Dockerfile#L19).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 184293)
Time Spent: 40m (was: 0.5h)
> Gradle setupVirtualenv supports Python 3
> ----------------------------------------
>
> Key: BEAM-6024
> URL: https://issues.apache.org/jira/browse/BEAM-6024
> Project: Beam
> Issue Type: Sub-task
> Components: sdk-py-harness
> Reporter: Mark Liu
> Assignee: Mark Liu
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Need to depend on Python 3 virtualenv in few places:
> - Build Dataflow worker container in Python 3
> - Run ValidatesRunner and integration tests on Jenkins
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)