Code0x58 commented on a change in pull request #3601:
URL: https://github.com/apache/incubator-heron/pull/3601#discussion_r471051746



##########
File path: docker/test/Dockerfile.ubuntu18.04
##########
@@ -29,15 +29,17 @@ RUN apt-get update && apt-get -y install \
       libcppunit-dev \
       patch \
       python3-dev \
+      python3-venv \
       wget \
       zip \
-      virtualenv \
       unzip \
       git \
       curl \
       tree \
       openjdk-11-jdk-headless
 
+RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

Review comment:
       That makes it sound like bazel (that `.cc` is a part of it) is trying to 
run `python` on the system, rather than `python3` for some reason, which would 
be a preexisting issue. Maybe it's because `test --host_force_python=PY3` isn't 
in `tools/bazel.rc`?

##########
File path: docker/compile/deprecated/Dockerfile.ubuntu16.04
##########
@@ -49,6 +49,8 @@ RUN apt-get update && apt-get -y install \
 
 ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
 
+RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

Review comment:
       echo on this

##########
File path: bazel_configure.py
##########
@@ -413,7 +413,7 @@ def main():
   env_map['AUTOMAKE'] = discover_tool('automake', 'Automake', 'AUTOMAKE', 
'1.9.6')
   env_map['AUTOCONF'] = discover_tool('autoconf', 'Autoconf', 'AUTOCONF', 
'2.6.3')
   env_map['MAKE'] = discover_tool('make', 'Make', 'MAKE', '3.81')
-  env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.4')
+  env_map['PYTHON3'] = discover_tool('python3', 'Python3', 'PYTHON3', '3.5')
 

Review comment:
       It might take a custom test, which I think there's already some of. I'm 
not sure if there is a nice portable test for `venv` other than something like:
   ```python
   import subprocess, tempfile
   def test_venv():
       with tempfile.TemporaryDirectory() as tmpdirname:
           return subprocess.run(["python3", "-mvenv", tmdpirname]).returncode 
== 0
   ```
   
   The reason I think this is because I suspect there will be difference with 
how distribution maintainers can choose how this is included, and trying to 
cater for nuances doesn't sound good.
   
   _trivia:_ Debian make `venv` and `pip` separate packages, whereas the 
[`cpython` 
codebase](https://github.com/python/cpython/blob/master/Lib/venv/__init__.py) 
can let you install `venv` along with `python`, and then `pip` will be created 
using vendoered version that `ensurepip` unfurls (debian patches this out).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to