pkgconfig is a Python module to interface with the pkg-config command line tool and supports Python 2.6+.
It can be used to
find all pkg-config packages
>>> packages = pkgconfig.list_all()
check if a package exists
>>> pkgconfig.exists('glib-2.0') Truecheck if a package meets certain version requirements
>>> pkgconfig.installed('glib-2.0', '< 2.26') Falsequery CFLAGS and LDFLAGS
>>> pkgconfig.cflags('glib-2.0') '-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include' >>> pkgconfig.libs('glib-2.0') '-lglib-2.0'get all variables defined for a package:
>>> pkgconfig.variables('glib-2.0') {u'exec_prefix': u'/usr'}parse the output to build extensions with setup.py
>>> d = pkgconfig.parse('glib-2.0 gtk+-2.0') >>> d['libraries'] [u'gtk+-2.0', u'glib-2.0']The pkgconfig.parse function return a dictonary of list. The lists returned are an accurate representations of the equivalent pkg-config call, both in content and order.
If pkg-config is not on the path, raises EnvironmentError.
The pkgconfig module is licensed under the MIT license.
Changelog
Version 1.4.0
Add boolean static keyword to output private libraries as well
Raise original OSError as well
Version 1.3.1
Fix compatibility problems with Python 2.6
Version 1.3.0
Add variables() API to query defined variables
Disable Python 3.2 and enable Python 3.5 and 3.6 tests
Fix #16: handle spaces of values in .pc files correctly
Version 1.2.1 and 1.2.2
Bug fix releases released on December 1st and 2nd 2016.
Include the data folder in the distribution in order to run tests
Improve the tests
Version 1.2.0
Released on November 30th 2016.
Potential break: switch from result set to list
Expose –list-all query
Added support for PKG_CONFIG environment variable
Version 1.1.0
Released on November 6th 2013.
Multiple packages can now be parsed with a single call to .parse.
Version 1.0.0
First release on September 8th 2013.
Metadata
Release files for pkgconfig 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pkgconfig-1.4.0.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pkgconfig-1.4.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / pkgconfig-1.4.0.tar.gz
| Download URL | pkgconfig-1.4.0.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
048c3b457da7b6f686b647ab10bf09e2250e4c50acfe6f215398a8b5e6fcdb52
|
|
BLAKE2b-256 checksum How to use checksums |
17b7b6e2b5798eeadb6bfbebf6c332c8989463166769815f74d6e87ed9951f61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
|
Release files / pkgconfig-1.4.0-py2.py3-none-any.whl
| Download URL | pkgconfig-1.4.0-py2.py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3eb03a6345d4916489d3433f60e6d044a21f50e1d86fb611a52fd28061582065
|
|
BLAKE2b-256 checksum How to use checksums |
e18ac205fad800317a59e8d218981a8a7a3a00ec69c7fd55eca58dd08e6b0a18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/20.7.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
|