This is an automated email from the ASF dual-hosted git repository.

kenn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 354bca0  [BEAM-6459] Don't run setupVirtualenv during clean
     new dc05153  Merge pull request #7897: [BEAM-6459] Don't run 
setupVirtualenv during clean
354bca0 is described below

commit 354bca011543a17cdde2993449b0d4c6174558bc
Author: Udi Meiri <eh...@google.com>
AuthorDate: Tue Feb 19 16:19:15 2019 -0800

    [BEAM-6459] Don't run setupVirtualenv during clean
    
    `cleanPython` no longer depends on `setupVirtualenv`.
---
 .../src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy 
b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
index 779915d..3fd4435 100644
--- a/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
+++ b/buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy
@@ -1631,11 +1631,14 @@ class BeamModulePlugin implements Plugin<Project> {
       }
       project.installGcpTest.mustRunAfter project.sdist
 
-      project.task('cleanPython', dependsOn: 'setupVirtualenv') {
+      project.task('cleanPython') {
         doLast {
+          def activate = "${project.ext.envdir}/bin/activate"
           project.exec {
             executable 'sh'
-            args '-c', ". ${project.ext.envdir}/bin/activate && python 
${pythonRootDir}/setup.py clean"
+            args '-c', "if [ -e ${activate} ]; then " +
+                    ". ${activate} && python ${pythonRootDir}/setup.py clean; 
" +
+                    "fi"
           }
           project.delete project.buildDir     // Gradle build directory
           project.delete project.ext.envdir   // virtualenv directory

Reply via email to