[ 
https://issues.apache.org/jira/browse/BEAM-3257?focusedWorklogId=87318&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-87318
 ]

ASF GitHub Bot logged work on BEAM-3257:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 03/Apr/18 22:42
            Start Date: 03/Apr/18 22:42
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on a change in pull request #5010: 
[BEAM-3257] Add Python precommit gradle config
URL: https://github.com/apache/beam/pull/5010#discussion_r178982403
 
 

 ##########
 File path: sdks/python/build.gradle
 ##########
 @@ -25,75 +25,123 @@ apply plugin: "base"
 task test {}
 check.dependsOn test
 
-task setupTest {
+def envdir = "${project.buildDir}/gradleenv"
+
+task setupVirtualenv {
   doLast {
+    exec {
+      commandLine 'virtualenv', "${envdir}"
+    }
     exec {
       executable 'sh'
-      args '-c', 'which tox || pip install --user --upgrade tox'
+      args '-c', "source ${envdir}/bin/activate && pip install --upgrade tox"
     }
   }
+  outputs.files("$buildDir/.gradleenv/bin/tox")
 }
 
-task sdist {
+task sdist (dependsOn: 'setupVirtualenv') {
 
 Review comment:
   nit: remove the space between task name and arguments since its a method 
call like `sdist(dependsOn: 'setupVirtualenv') {` here and below.

----------------------------------------------------------------
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: 87318)
    Time Spent: 1.5h  (was: 1h 20m)

> Migrate Python Jenkins PreCommits to Gradle
> -------------------------------------------
>
>                 Key: BEAM-3257
>                 URL: https://issues.apache.org/jira/browse/BEAM-3257
>             Project: Beam
>          Issue Type: Sub-task
>          Components: build-system, testing
>            Reporter: Luke Cwik
>            Assignee: Udi Meiri
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Code is here: 
> https://github.com/apache/beam/blob/master/.test-infra/jenkins/job_beam_PreCommit_Python_MavenInstall.groovy



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to