-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmeson.build
More file actions
26 lines (25 loc) · 1.21 KB
/
meson.build
File metadata and controls
26 lines (25 loc) · 1.21 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
project('gmp', 'c',
version: run_command('python', 'scripts/gitversion.py',
check: true).stdout().strip(),
default_options: ['c_std=c17'])
py = import('python').find_installation(pure: false)
libzz = dependency('zz', version: '>= 0.9.0a4')
py.extension_module('gmp', ['fmt.c', 'gmp.c', 'utils.c'],
install: true, dependencies: libzz)
install_dir = py.get_install_dir()
# Generate version.py for sdist
meson.add_dist_script(['scripts/gitversion.py', '--meson-dist',
'--write', '_version.py'])
fs = import('fs')
if not fs.exists('_version.py')
generate_version = custom_target('generate-version',
install: true,
build_always_stale: true,
build_by_default: true,
output: '_version.py',
input: 'scripts/gitversion.py',
command: [py, '@INPUT@', '--write',
'@OUTPUT@'],
install_dir: install_dir,
install_tag: 'python-runtime')
endif