|
8 | 8 | from runez.pyenv import Version |
9 | 9 |
|
10 | 10 | from portable_python import LOG, patch_file, patch_folder, PPG, PythonBuilder |
11 | | -from portable_python.external.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Openssl, Readline, Sqlite, Uuid, Xz, Zlib |
| 11 | +from portable_python.external.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Openssl, Readline, Sqlite, Uuid, Xz, Zlib, Zstd |
12 | 12 | from portable_python.external.xtkinter import TkInter |
13 | 13 | from portable_python.inspector import LibAutoCorrect, PythonInspector |
14 | 14 |
|
@@ -96,7 +96,7 @@ def build_information(self): |
96 | 96 |
|
97 | 97 | @classmethod |
98 | 98 | def candidate_modules(cls): |
99 | | - return [LibFFI, Zlib, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter] |
| 99 | + return [LibFFI, Zlib, Zstd, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter] |
100 | 100 |
|
101 | 101 | @property |
102 | 102 | def url(self): |
@@ -172,6 +172,18 @@ def c_configure_args(self): |
172 | 172 | yield f"-ltcl{version.mm}" |
173 | 173 | yield f"-ltk{version.mm}" |
174 | 174 |
|
| 175 | + def xenv_LIBZSTD_CFLAGS(self): |
| 176 | + if self.version >= "3.14" and PPG.target.is_macos: |
| 177 | + # Normally ./configure will autodetect using pkg-config, but |
| 178 | + # this doesn't typically work on Mac (the pkg-config binary is |
| 179 | + # in homebrew, which we omit from path) so we have to provide |
| 180 | + # some hints about how to staticly include it. |
| 181 | + yield f"-I{self.deps}/include" |
| 182 | + |
| 183 | + def xenv_LIBZSTD_LIBS(self): |
| 184 | + if self.version >= "3.14" and PPG.target.is_macos: |
| 185 | + yield f"{self.deps_lib_dir}/libzstd.a" |
| 186 | + |
175 | 187 | @runez.cached_property |
176 | 188 | def prefix_lib_folder(self): |
177 | 189 | """Path to <prefix>/lib/pythonM.m folder""" |
|
0 commit comments