Skip to content

Commit

Permalink
Also include Engines sub-directories (issue JSBSim-Team#687).
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoconni committed Aug 20, 2022
1 parent c8704e3 commit 56d6d2c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions python/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 56d6d2c

Please # to comment.