Skip to content

helping python to find itself... #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 19, 2019
Merged

helping python to find itself... #50

merged 3 commits into from
Feb 19, 2019

Conversation

sciabarra
Copy link
Contributor

fixes #49

@@ -65,7 +65,7 @@ def build(source_dir, target_file, launcher):
if os.path.isfile(main):
cmd += """
cd %s
exec python %s "$@"
exec "$(which python)" %s "$@"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test with an action to check that sys.executable is not empty?

Copy link
Member

@csantanapr csantanapr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@csantanapr
Copy link
Member

@sciabarra it looks like Travis is failing

@csantanapr
Copy link
Member

@sciabarra you need to fix your scalafmt. I tried to push the patch into your master branch but I don't have write access

--- a/tests/src/test/scala/runtime/actionContainers/PythonActionContainerTests.scala
+++ b/tests/src/test/scala/runtime/actionContainers/PythonActionContainerTests.scala
@@ -439,7 +439,6 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
       })
   }

-
   it should "have a valid sys.executable" in {
     withActionContainer() { c =>
       val code =
@@ -449,12 +448,12 @@ class PythonActionContainerTests extends BasicActionRunnerTests with WskActorSys
           |    return { "sys": sys.executable }
         """.stripMargin

-        val (initCode, res) = c.init(initPayload(code))
-        initCode should be(200)
+      val (initCode, res) = c.init(initPayload(code))
+      initCode should be(200)

-        val (runCode, runRes) = c.run(runPayload(JsObject()))
-        runCode should be(200)
-        runRes.get.fields.get("sys").get.toString() should include("python")
+      val (runCode, runRes) = c.run(runPayload(JsObject()))
+      runCode should be(200)
+      runRes.get.fields.get("sys").get.toString() should include("python")
     }
   }
 }
--

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Python 3.7 - sys.executable is empty
3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy