File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -401,11 +401,29 @@ def get_version(self, package):
401
401
return None
402
402
403
403
404
+ class LibpngConfig (Configurator ):
405
+
406
+ def setup_extension (self , ext , package , ** kw ):
407
+ """Add parameters to the given `ext` for the given `package`."""
408
+ if package != 'freetype2' :
409
+ raise RuntimeError ('package must be "freetype2"' )
410
+ package = ''
411
+ return super (LibpngConfig , self ).setup_extension (ext , package , ** kw )
412
+
413
+ def get_version (self , package ):
414
+ if package != 'libpng' :
415
+ raise RuntimeError ('package must be libpng' )
416
+
417
+ status , output = getstatusoutput ('libpng-config --version' )
418
+ if status == 0 :
419
+ return output
420
+ return None
404
421
405
422
406
423
# The PkgConfig/FreetypeConfig class should be used through singletons
407
424
pkg_config = PkgConfig ('pkg-config' )
408
425
ft_config = FreetypeConfig ('freetype-config' )
426
+ png_config = LibpngConfig ('libpng-config' )
409
427
410
428
411
429
class CheckFailed (Exception ):
You can’t perform that action at this time.
0 commit comments