Skip to content

Commit

Permalink
Workaround extra .lib inclusion with meson tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ankith26 committed Mar 22, 2024
1 parent 9509420 commit 4c987ce
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions buildconfig/stubs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ install_subdir(
exclude_files: '.flake8',
install_dir: pg_dir,
strip_directory: true,
install_tag: 'pg-tag',
)
1 change: 1 addition & 0 deletions docs/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if fs.is_dir('generated')
],
exclude_files: ['.buildinfo', 'objects.inv'],
install_dir: pg_dir / 'docs',
install_tag: 'pg-tag',
)
elif get_option('error_docs_missing')
error('The "generated" docs folder does not exist!')
Expand Down
4 changes: 2 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ if plat == 'win' and host_machine.cpu_family().startswith('x86')
endif

# put dlls in root of install
install_data(dlls, install_dir: pg_dir)
install_data(dlls, install_dir: pg_dir, install_tag: 'pg-tag')
else
bases = ['/usr/local', '/usr', '/opt/homebrew', '/opt/local']
foreach inc_dir : bases
Expand Down Expand Up @@ -346,6 +346,6 @@ if not get_option('stripped')
subdir('docs')
subdir('test')
subdir('buildconfig/stubs')
install_subdir('examples', install_dir: pg_dir)
install_subdir('examples', install_dir: pg_dir, install_tag: 'pg-tag')
# TODO: install headers? not really important though
endif
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ hook-dirs = 'pygame.__pyinstaller:get_hook_dirs'
requires = ["meson-python", "ninja"] # add cython here when needed
build-backend = 'mesonpy'

[tool.meson-python.args]
install = ['--tags=runtime,python-runtime,pg-tag']
# uncomment to get werror locally
# [tool.meson-python.args]
# setup = ["-Derror_on_warns=true"]

[tool.cibuildwheel.config-settings]
Expand Down
2 changes: 1 addition & 1 deletion src_py/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ data_files = files(
'pygame_icon.icns',
'pygame_icon_mac.bmp',
)
install_data(data_files, install_dir: pg_dir)
install_data(data_files, install_dir: pg_dir, install_tag: 'pg-tag')

subdir('_sdl2')
subdir('__pyinstaller')
Expand Down
2 changes: 1 addition & 1 deletion test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ test_files = files(

py.install_sources(test_files, subdir: pg / 'tests')

install_subdir('fixtures', install_dir: pg_dir / 'tests')
install_subdir('fixtures', install_dir: pg_dir / 'tests', install_tag: 'pg-tag')
subdir('test_utils')

0 comments on commit 4c987ce

Please sign in to comment.