|
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, Zstd |
| 11 | +from portable_python.external.xcpython import Bdb, Bzip2, Gdbm, LibFFI, Mpdec, 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, Zstd, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter] |
| 99 | + return [LibFFI, Zlib, Zstd, Xz, Bzip2, Readline, Openssl, Sqlite, Bdb, Gdbm, Uuid, TkInter, Mpdec] |
100 | 100 |
|
101 | 101 | @property |
102 | 102 | def url(self): |
@@ -184,6 +184,18 @@ def xenv_LIBZSTD_LIBS(self): |
184 | 184 | if self.version >= "3.14" and PPG.target.is_macos: |
185 | 185 | yield f"{self.deps_lib_dir}/libzstd.a" |
186 | 186 |
|
| 187 | + def xenv_LIBMPDEC_CFLAGS(self): |
| 188 | + if self.version >= "3.14" and PPG.target.is_macos: |
| 189 | + # Normally ./configure will autodetect using pkg-config, but |
| 190 | + # this doesn't typically work on Mac (the pkg-config binary is |
| 191 | + # in homebrew, which we omit from path) so we have to provide |
| 192 | + # some hints about how to staticly include it. |
| 193 | + yield f"-I{self.deps}/include" |
| 194 | + |
| 195 | + def xenv_LIBMPDEC_LIBS(self): |
| 196 | + if self.version >= "3.14" and PPG.target.is_macos: |
| 197 | + yield f"{self.deps_lib_dir}/libmpdec.a" |
| 198 | + |
187 | 199 | @runez.cached_property |
188 | 200 | def prefix_lib_folder(self): |
189 | 201 | """Path to <prefix>/lib/pythonM.m folder""" |
|
0 commit comments