Generate and install a npy-pkg config file from a template.
The config file generated from template is installed in the given install directory, using subst_dict for variable substitution.
Parameters : | template : str
install_dir : str
subst_dict : dict, optional
|
---|
See also
Notes
This works for both standard installs and in-place builds, i.e. the @prefix@ refer to the source directory for in-place builds.
Examples
config.add_npy_pkg_config('foo.ini.in', 'lib', {'foo': bar})
Assuming the foo.ini.in file has the following content:
[meta]
Name=@foo@
Version=1.0
Description=dummy description
[default]
Cflags=-I@prefix@/include
Libs=
The generated file will have the following content:
[meta]
Name=bar
Version=1.0
Description=dummy description
[default]
Cflags=-Iprefix_dir/include
Libs=
and will be installed as foo.ini in the ‘lib’ subpath.