|
8 | 8 | Environment variables
|
9 | 9 | *********************
|
10 | 10 |
|
| 11 | +Environment variables can be used to influence ``meson-python``'s behavior, as |
| 12 | +well as the behavior of Meson and other tools that may be used during the |
| 13 | +build. This page lists all the environment variables directly used by |
| 14 | +``meson-python``. |
| 15 | + |
| 16 | +Meson recommends using command line arguments instead of environment variables, |
| 17 | +but does support a number of environment variables for compatibility with other |
| 18 | +build systems: |
| 19 | + |
| 20 | +- `Compiler and linker flag variables <https://mesonbuild.com/Reference-tables.html#compiler-and-linker-flag-environment-variables>`__ |
| 21 | +- `Compiler and linker selection variables <https://mesonbuild.com/Reference-tables.html#compiler-and-linker-selection-variables>`__ |
| 22 | + |
| 23 | +Other environment variables may influence how other tools used during the setup |
| 24 | +or build steps operate. For example, ``pkg-config`` supports |
| 25 | +``PKG_CONFIG_PATH`` which influences the search path for ``.pc`` files |
| 26 | +describing the available dependencies. |
| 27 | + |
| 28 | +.. warning:: |
| 29 | + |
| 30 | + Conda sets a number of environment variables during environment activation |
| 31 | + for compiler/linker selection (``CC``, ``CXX``, ``FC``, ``LD``) and |
| 32 | + compile/link flags (``CFLAGS``, ``CXXFLAGS``, ``FFLAGS``, ``LDFLAGS``) when |
| 33 | + compilers are installed in a conda environment. This may have unexpected |
| 34 | + side effects (see for example the note in |
| 35 | + :ref:`how-to-guides-debug-builds`). |
| 36 | + |
| 37 | + |
| 38 | +Environment variables used by meson-python |
| 39 | +========================================== |
| 40 | + |
11 | 41 | .. envvar:: ARCHFLAGS
|
12 | 42 |
|
13 | 43 | This environmental variable is used for supporting architecture cross
|
|
0 commit comments