diff --git a/python/setup.py.in b/python/setup.py.in index e50d02c67..77e121284 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -214,13 +214,15 @@ for d in os.scandir('data/aircraft'): data_files.append(('share/${PROJECT_NAME}/'+dir_name, list(XML_files(dir_name)))) - # Some aircraft folders include a `Systems` sub-directory: make sure it - # is copied in the wheel archive. - systems_dir = dir_name + '/Systems' - systems_dir_fullname = os.path.join('data', systems_dir) - if os.path.exists(systems_dir_fullname) and os.path.isdir(systems_dir_fullname): - data_files.append(('share/${PROJECT_NAME}/'+systems_dir, - list(XML_files(systems_dir)))) + # Some aircraft folders include a `Systems` and/or an `Engines` + # sub-directory so make sure it is copied in the wheel archive + # (see GH issue #687) + for sub_dir in ('Systems', 'Engines'): + sub_dir_name = dir_name + '/' + sub_dir + subdir_dir_fullname = os.path.join('data', sub_dir_name) + if os.path.exists(subdir_dir_fullname) and os.path.isdir(subdir_dir_fullname): + data_files.append(('share/${PROJECT_NAME}/'+sub_dir_name, + list(XML_files(sub_dir_name)))) # Build & installation process for the JSBSim Python module setup(