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

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

                Author: ASF GitHub Bot
            Created on: 01/Dec/18 15:24
            Start Date: 01/Dec/18 15:24
    Worklog Time Spent: 10m 
      Work Description: tweise closed pull request #7178: [BEAM-6163] Build 
python boot for mac and support process env on mac
URL: https://github.com/apache/beam/pull/7178
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/python/build.gradle b/sdks/python/build.gradle
index aba3904a1b6d..2d8149d5aa6b 100644
--- a/sdks/python/build.gradle
+++ b/sdks/python/build.gradle
@@ -16,6 +16,8 @@
  * limitations under the License.
  */
 
+import org.apache.tools.ant.taskdefs.condition.Os
+
 // Define common lifecycle tasks and artifact types
 apply plugin: "base"
 
@@ -459,7 +461,10 @@ project.task('createProcessWorker') {
   dependsOn ':beam-sdks-python-container:build'
   dependsOn 'setupVirtualenv'
   def sdkWorkerFile = file("${project.buildDir}/sdk_worker.sh")
-  def workerScript = 
"${project(":beam-sdks-python-container:").buildDir.absolutePath}/target/launcher/linux_amd64/boot"
+  def osType = 'linux'
+  if (Os.isFamily(Os.FAMILY_MAC))
+    osType = 'darwin'
+  def workerScript = 
"${project(":beam-sdks-python-container:").buildDir.absolutePath}/target/launcher/${osType}_amd64/boot"
   def sdkWorkerFileCode = "sh -c \". ${envdir}/bin/activate && ${workerScript} 
\$* \""
   outputs.file sdkWorkerFile
   doLast {
diff --git a/sdks/python/container/build.gradle 
b/sdks/python/container/build.gradle
index 5a09d3b51328..41ae6550d3a0 100644
--- a/sdks/python/container/build.gradle
+++ b/sdks/python/container/build.gradle
@@ -54,8 +54,8 @@ task copyDockerfileDependencies(type: Copy, dependsOn: build) 
{
 golang {
   packagePath = 'github.com/apache/beam/sdks/python/boot'
   build {
-    // TODO(herohde): build local platform + linux-amd64, if possible.
-    targetPlatform = ['linux-amd64']
+    // Build for linux and mac.
+    targetPlatform = ['linux-amd64', 'darwin-amd64']
     outputLocation = './build/target/launcher/${GOOS}_${GOARCH}/boot'
   }
 }


 

----------------------------------------------------------------
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: 171306)
    Time Spent: 1h  (was: 50m)

> Support Process environment on Mac
> ----------------------------------
>
>                 Key: BEAM-6163
>                 URL: https://issues.apache.org/jira/browse/BEAM-6163
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-py-harness
>            Reporter: Ankur Goenka
>            Assignee: Ankur Goenka
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The current process script used to run process based sdk harness is os 
> dependent and only works on linux.
> Make the script work on mac



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

Reply via email to