Skip to content

Commit

Permalink
setup.py: Properly add _sdl2_data_files to data_files
Browse files Browse the repository at this point in the history
Currently, this code is _ALWAYS_ adding an empty list instead of the data files that were found by `glob.glob()`.
  • Loading branch information
cclauss authored Mar 25, 2024
1 parent 65a256d commit db7cbf2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,9 @@ def run_install_headers(self):
for type_file in type_files:
pygame_data_files.append(type_file)

_sdl2 = glob.glob(os.path.join(stub_dir, '_sdl2', '*.pyi'))
if _sdl2:
_sdl2_data_files = []
_sdl2_data_files = glob.glob(os.path.join(stub_dir, '_sdl2', '*.pyi'))
if _sdl2_data_files:
data_files.append(('pygame/_sdl2', _sdl2_data_files))
for type_file in _sdl2:
_sdl2_data_files.append(type_file)

# add non .py files in lib directory
for f in glob.glob(os.path.join('src_py', '*')):
Expand Down

0 comments on commit db7cbf2

Please sign in to comment.