#=================
# Compile CPython 3.13.0rc2 from source

RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev libsqlite3-dev && apt-get clean
RUN apt-get update && apt-get install -y jq build-essential libffi-dev && apt-get clean

RUN cd /tmp && ${'\\'}
    wget -q https://www.python.org/ftp/python/3.13.0/Python-3.13.0rc2.tgz && ${'\\'}
    tar xzvf Python-3.13.0rc2.tgz && ${'\\'}
    cd Python-3.13.0rc2 && ${'\\'}
    ./configure && ${'\\'}
    make -j4 && ${'\\'}
    make install


RUN cd /tmp && ${'\\'}
    echo "ad7f44153649e27ec385e7633e853e03  Python-3.13.0rc2.tgz" > checksum.md5 && ${'\\'}
    md5sum -c checksum.md5

RUN python3.13 -m ensurepip && ${'\\'}
    python3.13 -m pip install coverage
