@@ -21,15 +21,44 @@ def load_json_file_path_under_setting_folder():
2121 json_file_paths = []
2222 setting_root_path = os .path .join (os .getcwd (), 'src' , 'aceinna' , 'setting' )
2323 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 )
2526 if not json_file :
2627 continue
2728
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 )
2931 json_file_paths .append (json_file_path )
3032
3133 return json_file_paths
3234
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+
3362PACKAGE_DESCRIPTION = "Aceinna Navigation System Open Devices Library"
3463
3564INSTALL_REQUIRES = [
@@ -55,7 +84,7 @@ def load_json_file_path_under_setting_folder():
5584 packages = find_packages ("src" , exclude = ['test' , 'tests' ]),
5685 package_dir = {"" : "src" },
5786 package_data = {
58- 'aceinna' : load_json_file_path_under_setting_folder ()
87+ 'aceinna' : load_resources ()
5988 },
6089 classifiers = [
6190 "Environment :: Console" ,
0 commit comments