Skip to main content

Interface Python with pkg-config

Project description

https://travis-ci.org/matze/pkgconfig.png?branch=master

pkgconfig is a Python module to interface with the pkg-config command line tool and supports Python 2.6+.

It can be used to

  • check if a package exists

    >>> pkgconfig.exists('glib-2.0')
    True
  • check if a package meets certain version requirements

    >>> pkgconfig.installed('glib-2.0', '< 2.26')
    False
  • query 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'
  • parse the output to build extensions with setup.py

    >>> d = pkgconfig.parse('glib-2.0 gtk+-2.0')
    >>> d['libraries']
    set([u'glib-2.0', u'gtk+-2.0'])

The pkgconfig module is licensed under the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pkgconfig-1.1.0.tar.gz (3.9 kB view details)

Uploaded Source

File details

Details for the file pkgconfig-1.1.0.tar.gz.

File metadata

  • Download URL: pkgconfig-1.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pkgconfig-1.1.0.tar.gz
Algorithm Hash digest
SHA256 709daaf077aa2b33bedac12706373412c3683576a43013bbaa529fc2769d80df
MD5 15998b487c15c5954feb79443b5a937a
BLAKE2b-256 87354af9634270c00e3411cf951b7e0ea796c262922357cfc7609a86d31f072b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page