pkgconfig

A Python interface to the pkg-config command line tool

https://github.com/matze/pkgconfig

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.0%) to scientific vocabulary

Keywords from Contributors

qt build-tools hpsf radiuss spack gtk tk wx astropy astronomy
Last synced: 10 months ago · JSON representation

Repository

A Python interface to the pkg-config command line tool

Basic Info
  • Host: GitHub
  • Owner: matze
  • License: mit
  • Language: Python
  • Default Branch: master
  • Size: 102 KB
Statistics
  • Stars: 62
  • Watchers: 6
  • Forks: 22
  • Open Issues: 11
  • Releases: 0
Created almost 13 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.rst

pkgconfig
=========

.. image:: https://github.com/matze/pkgconfig/workflows/CI/badge.svg
    :target: https://github.com/matze/pkgconfig/actions/workflows/ci.yml

``pkgconfig`` is a Python module to interface with the ``pkg-config``
command line tool for Python 3.9+.

It can be used to

-  find all pkg-config packages ::

       >>> packages = pkgconfig.list_all()

-  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

-  return the version ::

       >>> pkgconfig.modversion('glib-2.0')
       '2.56.3'

-  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'

-  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']

   or ::

       >>> ext = Extension('foo', ['foo.c'])
       >>> # sets extension attributes as needed
       >>> pkgconfig.configure_extension(ext, 'glib-2.0 gtk+-2.0')

   The ``pkgconfig.parse`` function returns a dictonary of lists.
   The lists returned are accurate representations of the equivalent
   ``pkg-config`` call's result, 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.6.0
~~~~~~~~~~~~~

- Drop support for Python < 3.9, support 3.9, 3.10, 3.11, 3.12.
- Switch CI from travis to github actions, test on all supported Python versions.
- Use src/ layout for project, fixes #36. Also move tests and test data to tests/.
- Replace deprecated distutils by setuptools to make tests work on py312, fixes #64.
- Fix configure_extension for empty cflags or libs.

Version 1.5.5
~~~~~~~~~~~~~

- Make tests more robust by sorting

Version 1.5.4
~~~~~~~~~~~~~

- Adjust pyproject.toml and drop Python 2 support

Version 1.5.3
~~~~~~~~~~~~~

- Add ``configure_extension`` API

Version 1.5.2
~~~~~~~~~~~~~

- Update poetry dep
- Improve CI

Version 1.5.0
~~~~~~~~~~~~~

- Use poetry instead of setuptools directly
- Fix #42: raise exception if package is missing
- Fix version parsing for openssl-like version numbers, fixes #32
- Fix #31: expose --modversion
- Fix #30: strip whitespace from variable names

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.

Owner

  • Name: Matthias Vogelgesang
  • Login: matze
  • Kind: user
  • Location: Karlsruhe
  • Company: Cinemo

GitHub Events

Total
  • Issues event: 1
  • Watch event: 2
  • Pull request event: 1
  • Fork event: 1
Last Year
  • Issues event: 1
  • Watch event: 2
  • Pull request event: 1
  • Fork event: 1

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 117
  • Total Committers: 15
  • Avg Commits per committer: 7.8
  • Development Distribution Score (DDS): 0.453
Past Year
  • Commits: 16
  • Committers: 1
  • Avg Commits per committer: 16.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Matthias Vogelgesang m****g@g****m 64
Thomas Waldmann tw@w****e 22
Eric N. Vander Weele e****w@g****m 7
James Tocknell a****r@g****m 5
François Bissey f****y@c****z 3
Christian Clauss c****s@m****m 3
Antony Lee a****e@g****m 3
Mher Kazandjian m****n@g****m 2
Julian Rüth j****h@f****g 2
ujjwalsh u****p@g****m 1
ossdev07 3****7 1
Nikita Chepanov n****a@c****m 1
Mario Corchero m****m@b****t 1
David Seifert s****p@g****g 1
Ryan Leckey r****y@c****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 12 months ago

All Time
  • Total issues: 38
  • Total pull requests: 39
  • Average time to close issues: 5 months
  • Average time to close pull requests: 10 days
  • Total issue authors: 22
  • Total pull request authors: 16
  • Average comments per issue: 2.89
  • Average comments per pull request: 1.95
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 6
  • Average time to close issues: 10 days
  • Average time to close pull requests: 5 days
  • Issue authors: 2
  • Pull request authors: 1
  • Average comments per issue: 1.0
  • Average comments per pull request: 2.17
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ThomasWaldmann (11)
  • ericvw (4)
  • kiwifb (4)
  • tanimislam (1)
  • FRidh (1)
  • mweinelt (1)
  • karolyi (1)
  • nchepanov (1)
  • seckwei (1)
  • Youw (1)
  • dirteat (1)
  • Birger0 (1)
  • scarabeusiv (1)
  • thebaptiste (1)
  • fsteinel (1)
Pull Request Authors
  • ThomasWaldmann (15)
  • ericvw (5)
  • aragilar (5)
  • kiwifb (3)
  • anntzer (3)
  • mherkazandjian (2)
  • ossdev07 (1)
  • SoapGentoo (1)
  • mehcode (1)
  • nchepanov (1)
  • CL-Jeremy (1)
  • scarlehoff (1)
  • saraedum (1)
  • matze (1)
  • cclauss (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 21
  • Total downloads:
    • pypi 2,355,928 last-month
  • Total docker downloads: 28,893,412
  • Total dependent packages: 35
    (may contain duplicates)
  • Total dependent repositories: 710
    (may contain duplicates)
  • Total versions: 67
  • Total maintainers: 3
pypi.org: pkgconfig

Interface Python with pkg-config

  • Versions: 16
  • Dependent Packages: 21
  • Dependent Repositories: 652
  • Downloads: 2,355,928 Last month
  • Docker Downloads: 28,893,412
Rankings
Downloads: 0.2%
Docker downloads count: 0.3%
Dependent repos count: 0.5%
Dependent packages count: 0.6%
Average: 3.2%
Forks count: 8.5%
Stargazers count: 8.7%
Maintainers (1)
Last synced: 12 months ago
proxy.golang.org: github.com/matze/pkgconfig
  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 7.0%
Average: 8.2%
Dependent repos count: 9.3%
Last synced: 11 months ago
alpine-v3.18: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 10.9%
Stargazers count: 21.6%
Forks count: 21.8%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.18: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 10.9%
Stargazers count: 21.6%
Forks count: 21.8%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.14: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 12.2%
Stargazers count: 13.5%
Forks count: 13.6%
Dependent packages count: 21.7%
Maintainers (1)
Last synced: 11 months ago
spack.io: py-pkgconfig

Interface Python with pkg-config.

  • Versions: 4
  • Dependent Packages: 5
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 11.6%
Average: 13.0%
Forks count: 19.9%
Stargazers count: 20.4%
Maintainers (1)
Last synced: over 1 year ago
alpine-v3.15: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 13.8%
Stargazers count: 14.9%
Forks count: 14.9%
Dependent packages count: 25.6%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.16: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 14.9%
Forks count: 16.1%
Stargazers count: 16.3%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 11 months ago
alpine-edge: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 14.6%
Average: 15.0%
Forks count: 22.2%
Stargazers count: 23.0%
Maintainers (1)
Last synced: 11 months ago
alpine-edge: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 13.4%
Average: 15.5%
Forks count: 24.1%
Stargazers count: 24.5%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.17: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 16.5%
Forks count: 19.2%
Stargazers count: 19.5%
Dependent packages count: 27.3%
Maintainers (1)
Last synced: 11 months ago
conda-forge.org: pkgconfig
  • Versions: 7
  • Dependent Packages: 9
  • Dependent Repositories: 29
Rankings
Dependent packages count: 6.5%
Dependent repos count: 6.9%
Average: 22.2%
Forks count: 36.7%
Stargazers count: 38.8%
Last synced: 11 months ago
anaconda.org: pkgconfig
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 29
Rankings
Dependent repos count: 29.2%
Average: 43.6%
Stargazers count: 47.0%
Forks count: 47.1%
Dependent packages count: 51.2%
Last synced: 11 months ago
alpine-v3.21: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.22: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.19: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.20: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.20: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.22: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.19: py3-pkgconfig-pyc

Precompiled Python bytecode for py3-pkgconfig

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago
alpine-v3.21: py3-pkgconfig

Python interface for the pkg-config command line tool

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 11 months ago

Dependencies

pyproject.toml pypi
  • pytest ^3.8.2 develop
  • python ^3.3
.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite