pkgconfig is a Python library that provides a simple interface to the `pkg-config` command-line tool. It allows Python applications to query installed libraries for their build flags (Cflags, Libs) and version information, making it easier to build and link against external C/C++ libraries. The current version is 1.6.0, and it has an infrequent release cadence, typically releasing new versions only when significant updates or fixes are needed.
pip install pkgconfigVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to check for a package's existence, retrieve its CFLAGS and LIBS, get its version, and parse all available information into a dictionary using `pkgconfig.parse().`
Ensure that the `pkg-config` command-line tool is installed on your operating system (e.g., `sudo apt install pkg-config` on Debian/Ubuntu, `brew install pkg-config` on macOS, or via MSYS2/MinGW on Windows).
If you need to define new packages for `pkg-config` to find, you must manually create and place `.pc` files in a directory included in `PKG_CONFIG_PATH`.
Replace calls to `pkgconfig.VARIABLES` with `pkgconfig.parse('your_package')['Variables']`.pip install pkgconfig
Install the 'pkg-config' command-line tool using your system's package manager (e.g., 'sudo apt install pkg-config' for Debian/Ubuntu, 'sudo yum install pkgconfig' for RedHat/CentOS, 'brew install pkg-config' for macOS).
Set the PKG_CONFIG_PATH environment variable to include the directory where the '.pc' file for the missing package is located (e.g., 'export PKG_CONFIG_PATH=/path/to/lib/pkgconfig:$PKG_CONFIG_PATH').
Install the 'pkg-config' command-line tool using your system's package manager (e.g., 'sudo apt install pkg-config') before attempting to install the Python package again.
No dependency data recorded yet.