-
Notifications
You must be signed in to change notification settings - Fork 592
Dockerfiles Python 3 cleanup #3601
Changes from all commits
6c42a34
bc558e2
3cc27c6
da5af49
d73fbc7
c8ce25f
1f16afe
d87c59d
35f49c7
165ca46
0aa5b10
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,6 @@ RUN yum -y install \ | |
libtool \ | ||
make \ | ||
patch \ | ||
python \ | ||
python3-devel \ | ||
zip \ | ||
unzip \ | ||
|
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -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 | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is linking There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I got this error:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That makes it sound like bazel (that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just tested with the following, but it still fails:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems to be related to this line. Maybe we don't need it? Testing it now with it removed. Line 398 in ee73293
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like it's needed for some of the |
||||
|
||||
ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64 | ||||
|
||||
ENV bazelVersion 3.4.1 | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably check that
python -m venv
returns non-zero (the version will be same as the python interpreter)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a suggestion of how best to do this? Seems the
discover_tool
method wouldn't work for what you describe, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: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
andpip
separate packages, whereas thecpython
codebase can let you installvenv
along withpython
, and thenpip
will be created using vendoered version thatensurepip
unfurls (debian patches this out).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the test function. Let me know if it looks good.