@@ -21,15 +21,44 @@ def load_json_file_path_under_setting_folder():
21
21
json_file_paths = []
22
22
setting_root_path = os .path .join (os .getcwd (), 'src' , 'aceinna' , 'setting' )
23
23
for root , dirs , files in os .walk (setting_root_path ):
24
- json_file = next ((item for item in files if item .__contains__ ('.json' )), None )
24
+ json_file = next (
25
+ (item for item in files if item .__contains__ ('.json' )), None )
25
26
if not json_file :
26
27
continue
27
28
28
- json_file_path = os .path .join (root .replace (setting_root_path ,'setting' ), json_file )
29
+ json_file_path = os .path .join (root .replace (
30
+ setting_root_path , 'setting' ), json_file )
29
31
json_file_paths .append (json_file_path )
30
32
31
33
return json_file_paths
32
34
35
+
36
+ def load_libraries ():
37
+ file_paths = []
38
+ setting_root_path = os .path .join (os .getcwd (), 'src' , 'aceinna' , 'libs' )
39
+ for root , dirs , files in os .walk (setting_root_path ):
40
+ for item in files :
41
+ lib_file = item if item .__contains__ (
42
+ '.dll' ) or item .__contains__ ('.so' ) else None
43
+ if not lib_file :
44
+ continue
45
+
46
+ file_path = os .path .join (root .replace (
47
+ setting_root_path , 'libs' ), lib_file )
48
+ file_paths .append (file_path )
49
+
50
+ return file_paths
51
+
52
+
53
+ def load_resources ():
54
+ resources = []
55
+ json_files = load_json_file_path_under_setting_folder ()
56
+ lib_files = load_libraries ()
57
+ resources .extend (json_files )
58
+ resources .extend (lib_files )
59
+ return resources
60
+
61
+
33
62
PACKAGE_DESCRIPTION = "Aceinna Navigation System Open Devices Library"
34
63
35
64
INSTALL_REQUIRES = [
@@ -55,7 +84,7 @@ def load_json_file_path_under_setting_folder():
55
84
packages = find_packages ("src" , exclude = ['test' , 'tests' ]),
56
85
package_dir = {"" : "src" },
57
86
package_data = {
58
- 'aceinna' : load_json_file_path_under_setting_folder ()
87
+ 'aceinna' : load_resources ()
59
88
},
60
89
classifiers = [
61
90
"Environment :: Console" ,
0 commit comments