# vim: filetype=yaml sw=2
version: 3.13.11
filename: 'python-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
container:
  use_container: 1
var:
  no_crosscompile: 1
  deps:
    - build-essential
    - python-all
    - libbz2-dev
    - libffi-dev
    - libncurses-dev
    - libsqlite3-dev
    - zlib1g-dev

  setup: |
    mkdir -p /var/tmp/dist
    tar -C /var/tmp/dist -xf $rootdir/[% c("python_tarfile") %]
    export PATH=/var/tmp/dist/python/bin:"$PATH"

  # This variable is used by tools/toolchain-updates/extract-firefox-versions-infos
  # to notice when the minimum python version required by firefox is
  # changing, so that we can review if we need to update python.
  #
  # Currently this custom python build is used on Linux only.
  #
  # Debian includes the following python versions:
  # bookworm (used for Android): 3.11.2
  # trixie (windows, macos): 3.13.5
  firefox_minimum_python_version: 3.9

input_files:
  - project: container-image
  - name: python
    URL: 'https://www.python.org/ftp/python/[% c("version") %]/Python-[% c("version") %].tar.xz'
    sha256sum: 16ede7bb7cdbfa895d11b0642fa0e523f291e6487194d53cf6d3b338c3a17ea2
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
    enable: '[% c("var/linux") %]'
  # We do not use the same we use as tor dependency because we do not want to
  # rebuild Clang, Rust and other projects at each OpenSSL update.
  # FWIW, these OpenSSL would be used for requests that will not go through,
  # as our builds run offline.
  - name: openssl
    URL: 'https://github.com/openssl/openssl/releases/download/openssl-3.5.4/openssl-3.5.4.tar.gz'
    sha256sum: 967311f84955316969bdb1d8d4b983718ef42338639c621ec4c34fddef355e99
