@@ -89,28 +89,6 @@ def _get_xdg_cache_dir():
89
89
options ['local_freetype' ] = lft or options .get ('local_freetype' , False )
90
90
91
91
92
- def has_include_file (include_dirs , filename ):
93
- """
94
- Returns `True` if *filename* can be found in one of the
95
- directories in *include_dirs*.
96
- """
97
- if sys .platform == 'win32' :
98
- include_dirs = [* include_dirs , # Don't modify it in-place.
99
- * os .environ .get ('INCLUDE' , '.' ).split (os .pathsep )]
100
- return any (pathlib .Path (dir , filename ).exists () for dir in include_dirs )
101
-
102
-
103
- def check_include_file (include_dirs , filename , package ):
104
- """
105
- Raises an exception if the given include file can not be found.
106
- """
107
- if not has_include_file (include_dirs , filename ):
108
- raise CheckFailed (
109
- "The C/C++ header for %s (%s) could not be found. You "
110
- "may need to install the development package." %
111
- (package , filename ))
112
-
113
-
114
92
def get_base_dirs ():
115
93
"""
116
94
Returns a list of standard base directories on this platform.
@@ -411,47 +389,6 @@ def get_setup_requires(self):
411
389
"""
412
390
return []
413
391
414
- def _check_for_pkg_config (self , package , include_file , min_version = None ,
415
- version = None ):
416
- """
417
- A convenience function for writing checks for a
418
- pkg_config-defined dependency.
419
-
420
- `package` is the pkg_config package name.
421
-
422
- `include_file` is a top-level include file we expect to find.
423
-
424
- `min_version` is the minimum version required.
425
-
426
- `version` will override the found version if this package
427
- requires an alternate method for that. Set version='unknown'
428
- if the version is not known but you still want to disabled
429
- pkg_config version check.
430
- """
431
- if version is None :
432
- version = pkg_config .get_version (package )
433
-
434
- if version is None :
435
- raise CheckFailed (
436
- "pkg-config information for '%s' could not be found." %
437
- package )
438
-
439
- if min_version and version != 'unknown' :
440
- if not is_min_version (version , min_version ):
441
- raise CheckFailed (
442
- "Requires %s %s or later. Found %s." %
443
- (package , min_version , version ))
444
-
445
- ext = self .get_extension ()
446
- if ext is None :
447
- ext = make_extension ('test' , [])
448
- pkg_config .setup_extension (ext , package )
449
-
450
- check_include_file (
451
- ext .include_dirs + get_include_dirs (), include_file , package )
452
-
453
- return 'version %s' % version
454
-
455
392
def do_custom_build (self ):
456
393
"""
457
394
If a package needs to do extra custom things, such as building a
0 commit comments