File tree Expand file tree Collapse file tree 4 files changed +175
-88
lines changed Expand file tree Collapse file tree 4 files changed +175
-88
lines changed Original file line number Diff line number Diff line change @@ -19,3 +19,30 @@ folders:
19
19
cpython-additional-packages :
20
20
# - Pillow==10.0.0
21
21
# - flake8==6.0.0
22
+
23
+ # Uncomment to download, compile and statically link Python module dependencies
24
+ # cpython-modules: libffi zlib xz bzip2 openssl uuid sqlite
25
+
26
+ # Uncomment to override a dependency version
27
+ # libffi-version: 3.3
28
+
29
+ # Uncomment to override cpython or a dependency source URL
30
+ # Note: string "$version" will be replaced with version string (e.g. 1.2.3)
31
+ # cpython-url: https://my-cpython-mirror/cpython-$version.tar.gz
32
+ # zlib-url: https://my-zlib-mirror/zlib-$version.tar.gz
33
+
34
+ # Uncomment to override the ./configure arguments for a dependency
35
+ # Note: this will replace the default arguments, not extend them
36
+ # Note: the string "$deps_lib" will be replaced with the output libs directory for the module
37
+ # openssl-configure: -v --openssldir=/etc/ssl no-shared no-idea no-tests no-dso
38
+
39
+ # Note: It's also possible to set configure args per platform/arch
40
+ # linux:
41
+ # openssl-configure: --with-terminfo-dirs=/etc/terminfo:/lib/terminfo:/usr/share/terminfo
42
+ # macos:
43
+ # openssl-configure: --with-terminfo-dirs=/usr/share/terminfo
44
+
45
+ # Note: you can also use one argument per line syntax
46
+ # openssl-configure:
47
+ # - -v
48
+ # - --openssldir=/etc/ssl
Original file line number Diff line number Diff line change 16
16
import pathlib
17
17
import re
18
18
from typing import ClassVar , List
19
+ from string import Template
19
20
20
21
import runez
21
22
from runez .http import RestClient
@@ -491,6 +492,16 @@ def is_usable_module(self, name):
491
492
def cfg_version (self , default ):
492
493
return PPG .config .get_value ("%s-version" % self .m_name ) or default
493
494
495
+ def cfg_url (self , version ):
496
+ if config_url := PPG .config .get_value ("%s-url" % self .m_name ):
497
+ url_template = Template (config_url )
498
+ return url_template .substitute (version = version )
499
+
8000
500
+ def cfg_configure (self , deps_lib ):
501
+ if configure := PPG .config .get_value ("%s-configure" % self .m_name ):
502
+ configure_template = Template (configure )
503
+ return configure_template .substitute (deps_lib = deps_lib )
504
+
494
505
@property
495
506
def url (self ):
496
507
"""Url of source tarball, if any"""
Original file line number Diff line number Diff line change @@ -104,6 +104,9 @@ def url(self):
104
104
if PPG .config .get_value ("cpython-use-github" ):
105
105
return f"https://github.com/python/cpython/archive/refs/tags/v{ self .version } .tar.gz"
106
106
107
+ if cfg_url := self .cfg_url (self .version ):
108
+ return cfg_url
109
+
107
110
return f"https://www.python.org/ftp/python/{ self .version .main } /Python-{ self .version } .tar.xz"
108
111
109
112
def xenv_LDFLAGS_NODIST (self ):
You can’t perform that action at this time.
0 commit comments