Reduce the number of Makefiles in 'src/' by one more
[babeltrace.git] / m4 / ae_python_modules.m4
CommitLineData
0235b0db 1# SPDX-License-Identifier: FSFULLR
1b39e2de 2#
0235b0db 3# Copyright (C) 2014 Jérémie Galarneau <jeremie.galarneau@efficios.com>
1b39e2de 4#
e015bae2 5# ae_python_modules.m4 -- Get the Python modules install path
1b39e2de
JG
6
7# While extra Python modules are generaly installed in the Python
8# interpreter's "site-packages" directory, Debian prefers using the
9# "dist-packages" nomenclature. This macro uses the interpreter
10# designated by the PYTHON variable to check the interpreter's PATH
11# and sets the PYTHON_MODULES_PATH by taking the prefix into account.
12
e015bae2
MJ
13#serial 1
14
15# AE_PATH_PYTHON_MODULES(PYTHON)
1b39e2de 16# ---------------------------------------------------------------------------
e015bae2 17AC_DEFUN([AE_PATH_PYTHON_MODULES],
1b39e2de
JG
18 [prog="import sys
19for path in sys.path:
20 if path.endswith(\"-packages\"):
21 print(path[[path.find(\"/lib\"):]])
22 break"
23 PYTHON_MODULES_PATH=`${$1} -c "$prog"`])
This page took 0.075083 seconds and 4 git commands to generate.