2022-08-02 14:03:17 +03:00
|
|
|
|
distributable:
|
|
|
|
|
url: https://www.python.org/ftp/python/{{ version }}/Python-{{ version }}.tar.xz
|
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
|
|
versions:
|
|
|
|
|
github: python/cpython/tags
|
|
|
|
|
|
|
|
|
|
dependencies:
|
2022-08-03 21:27:08 +03:00
|
|
|
|
zlib.net: 1
|
2022-08-02 14:03:17 +03:00
|
|
|
|
|
|
|
|
|
build:
|
|
|
|
|
dependencies:
|
|
|
|
|
tea.xyz/gx/cc: c99
|
|
|
|
|
tea.xyz/gx/make: '*'
|
|
|
|
|
script: |
|
2022-08-03 21:27:08 +03:00
|
|
|
|
sed -i.bak -e 's|system_lib_dirs = .*|system_lib_dirs = os.getenv("LIBRARY_PATH").split(":")|' ./setup.py
|
|
|
|
|
sed -i.bak -e 's|system_include_dirs = .*|system_include_dirs = os.getenv("CPATH").split(":")|' ./setup.py
|
|
|
|
|
|
2022-08-02 14:03:17 +03:00
|
|
|
|
./configure $ARGS
|
|
|
|
|
make --jobs {{ hw.concurrency }}
|
|
|
|
|
make install
|
|
|
|
|
cd {{ prefix }}/bin
|
|
|
|
|
ln -s python{{ version.major }} python
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
SHARE: /opt/python.org/share
|
|
|
|
|
ARGS:
|
|
|
|
|
- --prefix="{{ prefix }}"
|
|
|
|
|
# it’s 202x
|
|
|
|
|
- --enable-ipv6
|
|
|
|
|
# prevent auto updates -> we control that
|
|
|
|
|
- --without-ensurepip
|
|
|
|
|
- --disable-loadable-sqlite-extensions
|
|
|
|
|
# use our libraries not the bundled ones
|
|
|
|
|
- --with-system-expat
|
|
|
|
|
- --with-system-ffi
|
|
|
|
|
- --with-system-libmpdec
|
|
|
|
|
# these two make our binary not portable
|
|
|
|
|
#- --enable-optimizations
|
|
|
|
|
#- --with-lto
|
|
|
|
|
# on macOS we probably will actually want to --enable-framework
|
|
|
|
|
- --enable-shared
|
|
|
|
|
# put data that doesn’t vary between pythons in a consistent place
|
|
|
|
|
- --datarootdir="$SHARE"
|
|
|
|
|
- --datadir="$SHARE"
|
|
|
|
|
|
|
|
|
|
test:
|
2022-08-03 21:27:08 +03:00
|
|
|
|
#TODO test all modules eg zlib module
|
2022-08-02 14:03:17 +03:00
|
|
|
|
script:
|
|
|
|
|
python --version
|