File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,14 +172,17 @@ def c_configure_args(self):
172172 yield f"-ltcl{ version .mm } "
173173 yield f"-ltk{ version .mm } "
174174
175- if self .active_module (Zstd ):
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"LIBZSTD_CFLAGS=-I{ self .deps } /include"
182- yield f"LIBZSTD_LIBS={ self .deps_lib_dir } /libzstd.a"
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"
183186
184187
185188 @runez .cached_property
Original file line number Diff line number Diff line change @@ -430,8 +430,10 @@ def _do_linux_compile(self):
430430 self .run_make ()
431431 self .run_make ("install" )
432432
433+
433434class Zstd (ModuleBuilder ):
434435 """
436+ Newer compression format present in most 3.14+ builds
435437 """
436438
437439 m_debian = "!libzstd-dev"
@@ -443,12 +445,14 @@ def auto_select_reason(self):
443445 if self .setup .python_spec .version >= "3.14" :
444446 if PPG .target .is_macos :
445447 return "Required for 3.14 and up" # Well, "expected" anyway
446- elif not self .resolved_telltale :
448+ if not self .resolved_telltale :
447449 return "Required for 3.14 and up"
448450
449451 @property
450452 def url (self ):
451- return self .cfg_url (self .version ) or f"https://github.com/facebook/zstd/releases/download/v{ self .version } /zstd-{ self .version } .tar.gz"
453+ return (
454+ self .cfg_url (self .version ) or f"https://github.com/facebook/zstd/releases/download/v{ self .version } /zstd-{ self .version } .tar.gz"
455+ )
452456
453457 @property
454458 def version (self ):
You can’t perform that action at this time.
0 commit comments