diff options
author | 2016-08-09 17:54:11 +0000 | |
---|---|---|
committer | 2016-08-10 08:37:43 +0000 | |
commit | 679e911e948e6965afe1c23bb20ac4efdd65bac4 (patch) | |
tree | 9b743c7cecbe501d279e5172b5fb24e7850fc056 /src/main/java/com/google/devtools/build/lib/rules/python | |
parent | 3f814d72af4c86edfe997a5bb2217e6f753f16b1 (diff) |
Using stub_template.txt as __main__.py and zip header in python executable zip
In stub_template.txt, we now unzip the python zip file to a temp
directory if needed.
This will get rid of bash in python executable file completely.
Users can run the binary directly or using python <zip>, like:
./bazel-bin/examples/py_native/bin
or python ./bazel-bin/examples/py_native/bin
On Windows, we can use the second way to run python binary from native
Windows command line (cmd.exe).
--
Change-Id: I73fdd88f05f8f343dd19b2f3686ae031dfb476ba
Reviewed-on: https://bazel-review.googlesource.com/#/c/5310
MOS_MIGRATED_REVID=129767890
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/python')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java index d03f380e9d..ab3f3210f3 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java +++ b/src/main/java/com/google/devtools/build/lib/rules/python/PyCommon.java @@ -448,12 +448,6 @@ public final class PyCommon { public Artifact getExecutable() { return executable; } - /** @return An artifact next to the executable file with ".zip" suffix */ - public Artifact getPythonZipArtifact() { - PathFragment original = executable.getRootRelativePath(); - return ruleContext.getDerivedArtifact( - original.replaceName(original.getBaseName() + ".zip"), executable.getRoot()); - } public Map<PathFragment, Artifact> getConvertedFiles() { return convertedFiles; |