google / subpar

Subpar is a utility for creating self-contained python executables. It is designed to work well with Bazel.
Apache License 2.0
567 stars 69 forks source link

Subpar is failing on Bazel CI since the upgrade to Ubuntu 20.04 #133

Open Wyverald opened 3 years ago

Wyverald commented 3 years ago

Ubuntu 20.04 uses Python 3, which might be what's causing this.

Lots of test failures, see https://buildkite.com/bazel/subpar/builds/7413#7f8773f9-2385-4244-8a00-da4c4dd9a2ab

evanj commented 2 years ago

Ah yes. I just ran into this. The workaround is to update python to point to python3 with:

update-alternatives --install /usr/bin/python python /usr/bin/python3 0

It seems like this repository is unmaintained? However, if someone is maintaining it, I would be willing to attempt to make a patch that switches all references to python to python3. This would then require python3 to use subpar, but it could still build par archives that would run with any version of Python. This is probably a "breaking change" though. I don't have enough context about how subpar is used to determine if this would be a "good" fix. However, it would simplify distroless at least, which needs this hack in its build configuration: https://github.com/evanj/distroless/blob/main/cloudbuild.yaml#L24