Fix python3.0.x binary not found#6
Conversation
savannahostrowski
left a comment
There was a problem hiding this comment.
One nit but this looks solid to me! Thank you again!
|
Should we also add some tests here and if so can I assume that all of your CI runners have a python2 binary in the path as |
|
In the test.yml, there's a job for each platform. Let's not worry about python2. I'm happy saying this supports 3+. |
|
Oh 100% let's not worry about building python2. But the configure script (or Makefile) <= Python3.3 shells out to Docker setup with missing python2FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies and curl for uv
RUN apt-get update && apt-get install -y build-essential gdb lcov pkg-config \
libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \
libncurses5-dev libreadline6-dev libsqlite3-dev libssl-dev \
lzma lzma-dev tk-dev uuid-dev zlib1g-dev libzstd-dev \
inetutils-inetd curl git
# Install uv
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/root/.local/bin:$PATH"
COPY . .
RUN uv run every-python install v3.0.1
RUN uv run -- every-python run v3.0.1 -- python --version
CMD ["/bin/bash"]Run with: UPDATE: Apprently I was wrong, cannot reproduce this one 😅 |
savannahostrowski
left a comment
There was a problem hiding this comment.
Ah, I see. Thinking about this more, I think this is pretty niche and would require us to install Python 2 on the runners. I think the change is safe enough to accept as is, without the tests.
Explanation
Python3 before the 3.1 release creates a binary name
python3.0instead of the more commonpython3which every other version uses. I know with 3.0.x being EOL for more than 16 years this probably won't be a common occurrence. But I'm currently working on a archiving project that requires some trulyoldhistoric versions and this tool really helped building those CPython versions from source (thanks for that 🎉).Here is a screenshot of the output from a 3.0.1 build and the binaries produced (please ignore the empty block in the middle I did the
cdcalls with a lot of intermittent steps and so removed it for readability):Considerations
How I build it
I'm certain you already have well working developing setup but I fell into some pitfalls (like installing python2), so here is the docker file I used for completeness. It fails without before this PR and works with the changes.
Docker setup
On my arm based macOS host machine I also had to build it with the x86 compatibility mode:
docker build --platform linux/amd64 -t every-python .