3
3
import os
4
4
import sys
5
5
6
- blacklist = ["Kernel" , "Ruby" , "Tk" ]
6
+ blacklist = [
7
+ "Kernel" , "Ruby" , "Tk" ,
8
+ "DriverKit" , "HIDDriverKit" , "SkywalkDriverKit" , # has C++ code
9
+ "NetworkingDriverKit" , "USBSerialDriverKit" , # has C++ code
10
+ ]
7
11
8
12
9
13
def get_immediate_subdirectories (a_dir ):
@@ -16,11 +20,19 @@ def get_frameworks(sdk_path):
16
20
names = []
17
21
for frame in os .listdir (frameworks_path ):
18
22
if frame .endswith (".framework" ):
23
+ name = frame [:- len (".framework" )]
19
24
header_dir_path = frameworks_path + '/' + frame + '/Headers'
20
25
module_dir_path = frameworks_path + '/' + frame + '/Modules'
26
+ swiftmodule_path = module_dir_path + '/' + name + '.swiftmodule'
21
27
old_modulemap_path = frameworks_path + '/' + frame + '/module.map'
22
28
old_modulemap_private_path = frameworks_path + '/' + frame + \
23
29
'/module_private.map'
30
+
31
+ if os .path .exists (swiftmodule_path ):
32
+ if name not in blacklist :
33
+ names .append (name )
34
+ continue
35
+
24
36
if not os .path .exists (header_dir_path ):
25
37
if os .path .exists (module_dir_path ):
26
38
print >> sys .stderr , header_dir_path , \
@@ -36,7 +48,6 @@ def get_frameworks(sdk_path):
36
48
if should_exclude_framework (frameworks_path + '/' + frame ):
37
49
continue
38
50
39
- name = frame [:- len (".framework" )]
40
51
if name in blacklist :
41
52
continue
42
53
names .append (name )
0 commit comments