@@ -205,28 +205,6 @@ def write_cache(local_fn, data):
205
205
options ['local_freetype' ] = lft or options .get ('local_freetype' , False )
206
206
207
207
208
- def has_include_file (include_dirs , filename ):
209
- """
210
- Returns `True` if *filename* can be found in one of the
211
- directories in *include_dirs*.
212
- """
213
- if sys .platform == 'win32' :
214
- include_dirs = [* include_dirs , # Don't modify it in-place.
215
- * os .environ .get ('INCLUDE' , '.' ).split (os .pathsep )]
216
- return any (pathlib .Path (dir , filename ).exists () for dir in include_dirs )
217
-
218
-
219
- def check_include_file (include_dirs , filename , package ):
220
- """
221
- Raises an exception if the given include file can not be found.
222
- """
223
- if not has_include_file (include_dirs , filename ):
224
- raise CheckFailed (
225
- "The C/C++ header for %s (%s) could not be found. You "
226
- "may need to install the development package." %
227
- (package , filename ))
228
-
229
-
230
208
def get_base_dirs ():
231
209
"""
232
210
Returns a list of standard base directories on this platform.
@@ -523,47 +501,6 @@ def get_setup_requires(self):
523
501
"""
524
502
return []
525
503
526
- def _check_for_pkg_config (self , package , include_file , min_version = None ,
527
- version = None ):
528
- """
529
- A convenience function for writing checks for a
530
- pkg_config-defined dependency.
531
-
532
- `package` is the pkg_config package name.
533
-
534
- `include_file` is a top-level include file we expect to find.
535
-
536
- `min_version` is the minimum version required.
537
-
538
- `version` will override the found version if this package
539
- requires an alternate method for that. Set version='unknown'
540
- if the version is not known but you still want to disabled
541
- pkg_config version check.
542
- """
543
- if version is None :
544
- version = pkg_config .get_version (package )
545
-
546
- if version is None :
547
- raise CheckFailed (
548
- "pkg-config information for '%s' could not be found." %
549
- package )
550
-
551
- if min_version and version != 'unknown' :
552
- if not is_min_version (version , min_version ):
553
- raise CheckFailed (
554
- "Requires %s %s or later. Found %s." %
555
- (package , min_version , version ))
556
-
557
- ext = self .get_extension ()
558
- if ext is None :
559
- ext = make_extension ('test' , [])
560
- pkg_config .setup_extension (ext , package )
561
-
562
- check_include_file (
563
- ext .include_dirs + get_include_dirs (), include_file , package )
564
-
565
- return 'version %s' % version
566
-
567
504
def do_custom_build (self ):
568
505
"""
569
506
If a package needs to do extra custom things, such as building a
0 commit comments