#### Imports
fs = import('fs')
+python_module = import('python')
#### Variables
error('Dependency not found: neither Botan nor OpenSSL.')
endif
+# Kea shell
+PKGPYTHONDIR = 'unknown'
+py_installation = python_module.find_installation('python3', required: false)
+if py_installation.found()
+ PKGPYTHONDIR = py_installation.get_install_dir(pure: true) / 'kea'
+else
+ result = run_command(
+ PYTHON,
+ '-c',
+ 'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
+ check: false,
+ )
+ if result.returncode() == 0
+ PKGPYTHONDIR = result.stdout().strip() / 'kea'
+ endif
+endif
+
if TESTS_OPT.enabled()
conf_data.set('ENABLE_DEBUG', true)
conf_data.set('ENABLE_LOGGER_CHECKS', true)
report_conf_data.set('LD_ARGS', ' '.join(link_args))
report_conf_data.set('PYTHON_PATH', PYTHON.full_path())
report_conf_data.set('PYTHON_VERSION', PYTHON.version())
-result = run_command(
- PYTHON,
- '-c',
- 'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
- check: false,
-)
-if result.returncode() == 0
- report_conf_data.set('PKGPYTHONDIR', result.stdout().strip() + '/kea')
-else
- report_conf_data.set('PKGPYTHONDIR', 'unknown')
-endif
+report_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
result = cpp.run(
fs.read('compiler-checks/get-boost-version.cc'),
dependencies: [boost_dep],
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
kea_shell_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
-
-python = import('python')
-py_installation = python.find_installation('python3', required: true)
-python_install_dir = py_installation.get_install_dir(pure: true)
-pkgpythondir = python_install_dir / 'kea'
-kea_shell_conf_data.set('PKGPYTHONDIR', pkgpythondir)
+kea_shell_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
configure_file(
input: 'kea-shell.in',
output: 'kea_conn.py',
copy: true,
install: true,
- install_dir: pkgpythondir,
+ install_dir: PKGPYTHONDIR,
)
configure_file(
input: 'kea_connector3.py',
output: 'kea_connector3.py',
copy: true,
install: true,
- install_dir: pkgpythondir,
+ install_dir: PKGPYTHONDIR,
)
subdir('tests')