-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmeson.build
More file actions
74 lines (73 loc) · 2.33 KB
/
meson.build
File metadata and controls
74 lines (73 loc) · 2.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# OZI meson.build:root_files,root_children
# Part of TAP-Producer.
# See LICENSE.txt in the project root for details.
# DO NOT EDIT BY HAND - This file was generated for use with OZI tools.
# ozi-fix -> meson rewrite is the standard editing pipeline.
project(
'TAP-Producer',
default_options: ['warning_level=3'],
license: 'Apache-2.0 WITH LLVM-exception',
license_files: ['LICENSE.txt'],
meson_version: '>=1.1.0',
version: run_command(
'python3',
[
'-c',
'from setuptools_scm import get_version;print(get_version(normalize=False, fallback_version="%OZIBUILDVERSION%"))',
],
check: true,
).stdout().strip(),
)
fs = import('fs')
pymod = import('python')
python_dependencies = get_option('python-dependencies')
python = pymod.find_installation()
project_name = meson.project_name()
root_files = [
'README',
'CHANGELOG.md',
'LICENSE.txt',
'pyproject.toml',
'.gitignore',
]
pyproject_config = configuration_data()
pyproject_config.set(
'PYTHON_VERSION_DIST',
'py'+''.join(python.language_version().split('.'))
)
pyproject_config.set('VCS_TAG', '@VCS_TAG@')
configure_file(
input: 'pyproject.toml',
output: 'pyproject.toml',
configuration: pyproject_config
)
vcs_tag(input: 'pyproject.toml', output: 'pyproject.orig.toml')
foreach source : root_files
if source not in ['pyproject.toml', 'requirements.in', '.gitignore', 'README', 'CHANGELOG.md']
fs.copyfile(source)
elif source == 'README'
fs.copyfile(source, 'README.rst')
endif
endforeach
root_children = ['tap_producer', 'tests']
foreach child: root_children
subdir(child)
endforeach
if false
executable('root_files', root_files)
executable('source_files', source_files)
executable('ext_files', ext_files)
executable('test_files', test_files)
executable('root_children', root_children)
executable('source_children', source_children)
executable('test_children', test_children)
endif
if not meson.is_subproject()
dev = subproject('ozi')
foreach var : get_option('variables')
name = var.replace('-', '_')
set_variable(name, dev.get_variable(name))
endforeach
meson.add_dist_script(dev.get_variable('pip'), 'install', 'tomli>=2.0.0')
meson.add_dist_script(python, '-c', dev.get_variable('meson_dist_setuptools_scm'))
endif