pkgconfig


Namepkgconfig JSON
Version 1.5.5 PyPI version JSON
download
home_pagehttps://github.com/matze/pkgconfig
SummaryInterface Python with pkg-config
upload_time2021-07-19 18:49:51
maintainer
docs_urlNone
authorMatthias Vogelgesang
requires_python>=3.3,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            pkgconfig
=========

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

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

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/matze/pkgconfig",
    "name": "pkgconfig",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.3,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Matthias Vogelgesang",
    "author_email": "matthias.vogelgesang@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c4/e0/e05fee8b5425db6f83237128742e7e5ef26219b687ab8f0d41ed0422125e/pkgconfig-1.5.5.tar.gz",
    "platform": "",
    "description": "pkgconfig\n=========\n\n.. image:: https://travis-ci.org/matze/pkgconfig.png?branch=master\n    :target: https://travis-ci.org/matze/pkgconfig\n\n``pkgconfig`` is a Python module to interface with the ``pkg-config``\ncommand line tool for Python 3.3+.\n\nIt can be used to\n\n-  find all pkg-config packages ::\n\n       >>> packages = pkgconfig.list_all()\n\n-  check if a package exists ::\n\n       >>> pkgconfig.exists('glib-2.0')\n       True\n\n-  check if a package meets certain version requirements ::\n\n       >>> pkgconfig.installed('glib-2.0', '< 2.26')\n       False\n\n-  return the version ::\n\n       >>> pkgconfig.modversion('glib-2.0')\n       '2.56.3'\n\n-  query CFLAGS and LDFLAGS ::\n\n       >>> pkgconfig.cflags('glib-2.0')\n       '-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include'\n\n       >>> pkgconfig.libs('glib-2.0')\n       '-lglib-2.0'\n\n-  get all variables defined for a package::\n\n        >>> pkgconfig.variables('glib-2.0')\n        {u'exec_prefix': u'/usr'}\n\n-  parse the output to build extensions with setup.py ::\n\n       >>> d = pkgconfig.parse('glib-2.0 gtk+-2.0')\n       >>> d['libraries']\n       [u'gtk+-2.0', u'glib-2.0']\n\n   or ::\n\n       >>> ext = Extension('foo', ['foo.c'])\n       >>> # sets extension attributes as needed\n       >>> pkgconfig.configure_extension(ext, 'glib-2.0 gtk+-2.0')\n\n   The ``pkgconfig.parse`` function returns a dictonary of lists.\n   The lists returned are accurate representations of the equivalent\n   ``pkg-config`` call's result, both in content and order.\n\nIf ``pkg-config`` is not on the path, raises ``EnvironmentError``.\n\nThe ``pkgconfig`` module is licensed under the MIT license.\n\n\nChangelog\n---------\n\nVersion 1.5.4\n~~~~~~~~~~~~~\n\n- Adjust pyproject.toml and drop Python 2 support\n\nVersion 1.5.3\n~~~~~~~~~~~~~\n\n- Add ``configure_extension`` API\n\nVersion 1.5.2\n~~~~~~~~~~~~~\n\n- Update poetry dep\n- Improve CI\n\nVersion 1.5.0\n~~~~~~~~~~~~~\n\n- Use poetry instead of setuptools directly\n- Fix #42: raise exception if package is missing\n- Fix version parsing for openssl-like version numbers, fixes #32\n- Fix #31: expose --modversion\n- Fix #30: strip whitespace from variable names\n\nVersion 1.4.0\n~~~~~~~~~~~~~\n\n- Add boolean ``static`` keyword to output private libraries as well\n- Raise original ``OSError`` as well\n\nVersion 1.3.1\n~~~~~~~~~~~~~\n\n- Fix compatibility problems with Python 2.6\n\nVersion 1.3.0\n~~~~~~~~~~~~~\n\n- Add variables() API to query defined variables\n- Disable Python 3.2 and enable Python 3.5 and 3.6 tests\n- Fix #16: handle spaces of values in .pc files correctly\n\nVersion 1.2.1 and 1.2.2\n~~~~~~~~~~~~~~~~~~~~~~~\n\nBug fix releases released on December 1st and 2nd 2016.\n\n- Include the ``data`` folder in the distribution in order to run tests\n- Improve the tests\n\n\nVersion 1.2.0\n~~~~~~~~~~~~~\n\nReleased on November 30th 2016.\n\n- Potential break: switch from result set to list\n- Expose --list-all query\n- Added support for PKG_CONFIG environment variable\n\n\nVersion 1.1.0\n~~~~~~~~~~~~~\n\nReleased on November 6th 2013.\n\n- Multiple packages can now be parsed with a single call to ``.parse``.\n\n\nVersion 1.0.0\n~~~~~~~~~~~~~\n\nFirst release on September 8th 2013.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Interface Python with pkg-config",
    "version": "1.5.5",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "80f1e06563f3af0f090694db58736455",
                "sha256": "d20023bbeb42ee6d428a0fac6e0904631f545985a10cdd71a20aa58bc47a4209"
            },
            "downloads": -1,
            "filename": "pkgconfig-1.5.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "80f1e06563f3af0f090694db58736455",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.3,<4.0",
            "size": 6732,
            "upload_time": "2021-07-19T18:49:50",
            "upload_time_iso_8601": "2021-07-19T18:49:50.195229Z",
            "url": "https://files.pythonhosted.org/packages/32/af/89487c7bbf433f4079044f3dc32f9a9f887597fe04614a37a292e373e16b/pkgconfig-1.5.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "12523e11b91b050ca49975cc033689a4",
                "sha256": "deb4163ef11f75b520d822d9505c1f462761b4309b1bb713d08689759ea8b899"
            },
            "downloads": -1,
            "filename": "pkgconfig-1.5.5.tar.gz",
            "has_sig": false,
            "md5_digest": "12523e11b91b050ca49975cc033689a4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.3,<4.0",
            "size": 6082,
            "upload_time": "2021-07-19T18:49:51",
            "upload_time_iso_8601": "2021-07-19T18:49:51.669103Z",
            "url": "https://files.pythonhosted.org/packages/c4/e0/e05fee8b5425db6f83237128742e7e5ef26219b687ab8f0d41ed0422125e/pkgconfig-1.5.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-07-19 18:49:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "matze",
    "github_project": "pkgconfig",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "pkgconfig"
}
        
Elapsed time: 0.03629s