freelance-project-34-market.../python/meson.build
Siarhei Siniak 9a12e71493 [+] update module_switch
1. allow per module tool array;
  2. partially fix deploy:wheel;
2025-05-09 14:35:27 +03:00

61 lines
1.0 KiB
Meson

project(
run_command(
'tomlq', '-r', '.project.name', 'pyproject.toml',
check: true
).stdout().strip('\n'),
# 'online.fxreader.uv',
# ['c', 'cpp'],
version: '0.1.5.16+27.8',
# default_options: [
# 'cpp_std=c++23',
# # 'prefer_static=true',
# ],
)
install_path = get_option('install_path')
message('install_path = ' + install_path)
modes = get_option('modes')
fs = import('fs')
assert(modes.length() == 1, 'only one mode allowed')
mode = modes[0]
project_root = '.'
source_dir = project_root
include_dir = project_root
if mode == 'meson'
# error()
endif
if mode == 'pyproject'
py = import('python').find_installation(pure: false)
namespace_path = meson.project_name().replace('.', '/')
module_root = py.get_install_dir() / namespace_path
py.install_sources(
[
namespace_path,
],
subdir: namespace_path,
)
install_data(
files(
# 'py.typed',
# '__init__.py',
# 'pyproject.toml',
'py.typed',
),
install_dir : namespace_path,
install_tag: 'python-runtime',
)
endif