Skip to content

Commit 972435b

Browse files
committed
setup.py: Properly add _sdl2_data_files to data_files
Currently, this code is _ALWAYS_ adding an empty list instead of the data files that were found by `glob.glob()`.
1 parent ca77b33 commit 972435b

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

setup.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,12 +465,8 @@ def run_install_headers(self):
465465
for type_file in type_files:
466466
pygame_data_files.append(type_file)
467467

468-
_sdl2 = glob.glob(os.path.join(stub_dir, '_sdl2', '*.pyi'))
469-
if _sdl2:
470-
_sdl2_data_files = []
468+
if _sdl2_data_files := glob.glob(os.path.join(stub_dir, '_sdl2', '*.pyi')):
471469
data_files.append(('pygame/_sdl2', _sdl2_data_files))
472-
for type_file in _sdl2:
473-
_sdl2_data_files.append(type_file)
474470

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

0 commit comments

Comments
 (0)