Hello community, here is the log from the commit of package python-pkgconfig for openSUSE:Factory checked in at 2018-04-16 12:49:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pkgconfig (Old) and /work/SRC/openSUSE:Factory/.python-pkgconfig.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pkgconfig" Mon Apr 16 12:49:23 2018 rev:4 rq:596486 version:1.3.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pkgconfig/python-pkgconfig.changes 2017-07-03 09:36:18.984220449 +0200 +++ /work/SRC/openSUSE:Factory/.python-pkgconfig.new/python-pkgconfig.changes 2018-04-16 12:49:23.852220780 +0200 @@ -1,0 +2,14 @@ +Fri Apr 13 21:04:53 UTC 2018 - a...@gmx.de + +- specfile: + * update copyright year + +- update to version 1.3.1: + * Fix compatibility problems with Python 2.6 + +- changes from 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 + +------------------------------------------------------------------- Old: ---- pkgconfig-1.2.2.tar.gz New: ---- pkgconfig-1.3.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pkgconfig.spec ++++++ --- /var/tmp/diff_new_pack.V0jAjl/_old 2018-04-16 12:49:24.640192117 +0200 +++ /var/tmp/diff_new_pack.V0jAjl/_new 2018-04-16 12:49:24.640192117 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-pkgconfig # -# Copyright (c) 2017 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -13,30 +13,29 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# -%bcond_without tests - %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without tests Name: python-pkgconfig -Version: 1.2.2 +Version: 1.3.1 Release: 0 -License: MIT Summary: Interface Python with pkg-config -Url: http://github.com/matze/pkgconfig +License: MIT Group: Development/Languages/Python +URL: http://github.com/matze/pkgconfig Source: https://files.pythonhosted.org/packages/source/p/pkgconfig/pkgconfig-%{version}.tar.gz -BuildRequires: fdupes -BuildRequires: python-rpm-macros BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: pkgconfig +BuildArch: noarch %if %{with tests} # Test requirements BuildRequires: %{python_module nose} %endif -Requires: pkg-config -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildArch: noarch %python_subpackages %description @@ -59,8 +58,8 @@ %endif %files %{python_files} -%defattr(-,root,root,-) -%doc LICENSE README.rst +%license LICENSE +%doc README.rst %{python_sitelib}/* %changelog ++++++ pkgconfig-1.2.2.tar.gz -> pkgconfig-1.3.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/PKG-INFO new/pkgconfig-1.3.1/PKG-INFO --- old/pkgconfig-1.2.2/PKG-INFO 2016-12-02 10:35:04.000000000 +0100 +++ new/pkgconfig-1.3.1/PKG-INFO 2018-02-07 14:39:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pkgconfig -Version: 1.2.2 +Version: 1.3.1 Summary: Interface Python with pkg-config Home-page: http://github.com/matze/pkgconfig Author: Matthias Vogelgesang @@ -39,6 +39,11 @@ >>> 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') @@ -57,6 +62,18 @@ Changelog --------- + 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 ~~~~~~~~~~~~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/README.rst new/pkgconfig-1.3.1/README.rst --- old/pkgconfig-1.2.2/README.rst 2016-12-02 10:34:33.000000000 +0100 +++ new/pkgconfig-1.3.1/README.rst 2018-02-07 14:20:00.000000000 +0100 @@ -31,6 +31,11 @@ >>> 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') @@ -49,6 +54,18 @@ Changelog --------- +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 ~~~~~~~~~~~~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/pkgconfig/pkgconfig.py new/pkgconfig-1.3.1/pkgconfig/pkgconfig.py --- old/pkgconfig-1.2.2/pkgconfig/pkgconfig.py 2016-12-02 10:33:36.000000000 +0100 +++ new/pkgconfig-1.3.1/pkgconfig/pkgconfig.py 2018-02-07 14:15:59.000000000 +0100 @@ -23,10 +23,11 @@ tool.""" import os -import subprocess +import shlex import re import collections from functools import wraps +from subprocess import call, PIPE, Popen def _compare_versions(v1, v2): @@ -66,9 +67,8 @@ @_convert_error def _query(package, option): pkg_config_exe = os.environ.get('PKG_CONFIG', None) or 'pkg-config' - cmd = '{0} {1} {2}'.format(pkg_config_exe, option, package).split() - proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, - stderr=subprocess.PIPE) + cmd = '{0} {1} {2}'.format(pkg_config_exe, option, package) + proc = Popen(shlex.split(cmd), stdout=PIPE, stderr=PIPE) out, err = proc.communicate() return out.rstrip().decode('utf-8') @@ -83,7 +83,7 @@ """ pkg_config_exe = os.environ.get('PKG_CONFIG', None) or 'pkg-config' cmd = '{0} --exists {1}'.format(pkg_config_exe, package).split() - return subprocess.call(cmd) == 0 + return call(cmd) == 0 @_convert_error @@ -110,6 +110,20 @@ return _query(package, '--libs') +def variables(package): + """ + Return a dictionary of all the variables defined in the .pc pkg-config file + of 'package'. + """ + if not exists(package): + msg = "Package `{0}' does not exist in PKG_CONFIG_PATH".format(package) + raise ValueError(msg) + + result = _query(package, '--print-variables') + names = (x for x in result.split('\n') if x != '') + return dict(((x, _query(package, '--variable={0}'.format(x)).strip()) for x in names)) + + def installed(package, version): """ Check if the package meets the required version. @@ -182,7 +196,7 @@ out = out.replace('\\"', '') # Iterate through each token in the output. - for token in out.split(): + for token in re.split(r'(?<!\\) ', out): key = _PARSE_MAP.get(token[:2]) if key: result[key].append(token[2:].strip()) @@ -192,7 +206,7 @@ for declaration in result['define_macros']: macro = tuple(declaration.split('=')) if len(macro) == 1: - macro += '', + macro += None, macros.append(macro) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/pkgconfig.egg-info/PKG-INFO new/pkgconfig-1.3.1/pkgconfig.egg-info/PKG-INFO --- old/pkgconfig-1.2.2/pkgconfig.egg-info/PKG-INFO 2016-12-02 10:35:04.000000000 +0100 +++ new/pkgconfig-1.3.1/pkgconfig.egg-info/PKG-INFO 2018-02-07 14:39:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pkgconfig -Version: 1.2.2 +Version: 1.3.1 Summary: Interface Python with pkg-config Home-page: http://github.com/matze/pkgconfig Author: Matthias Vogelgesang @@ -39,6 +39,11 @@ >>> 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') @@ -57,6 +62,18 @@ Changelog --------- + 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 ~~~~~~~~~~~~~~~~~~~~~~~ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/pkgconfig.egg-info/SOURCES.txt new/pkgconfig-1.3.1/pkgconfig.egg-info/SOURCES.txt --- old/pkgconfig-1.2.2/pkgconfig.egg-info/SOURCES.txt 2016-12-02 10:35:04.000000000 +0100 +++ new/pkgconfig-1.3.1/pkgconfig.egg-info/SOURCES.txt 2018-02-07 14:39:58.000000000 +0100 @@ -10,5 +10,4 @@ pkgconfig.egg-info/PKG-INFO pkgconfig.egg-info/SOURCES.txt pkgconfig.egg-info/dependency_links.txt -pkgconfig.egg-info/pbr.json pkgconfig.egg-info/top_level.txt \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/pkgconfig.egg-info/pbr.json new/pkgconfig-1.3.1/pkgconfig.egg-info/pbr.json --- old/pkgconfig-1.2.2/pkgconfig.egg-info/pbr.json 2016-12-02 10:35:04.000000000 +0100 +++ new/pkgconfig-1.3.1/pkgconfig.egg-info/pbr.json 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -{"is_release": false, "git_version": "bcc07b4"} \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/setup.py new/pkgconfig-1.3.1/setup.py --- old/pkgconfig-1.2.2/setup.py 2016-12-02 10:33:53.000000000 +0100 +++ new/pkgconfig-1.3.1/setup.py 2018-02-07 14:19:29.000000000 +0100 @@ -1,6 +1,6 @@ from setuptools import setup -VERSION = '1.2.2' +VERSION = '1.3.1' setup( name='pkgconfig', @@ -12,6 +12,7 @@ packages=['pkgconfig'], description="Interface Python with pkg-config", long_description=open('README.rst').read(), - setup_requires=['nose>=1.0'], + tests_require=['nose>=1.0'], + python_requires='>=2.6, !=3.0.*, !=3.1.*, !=3.2.*', test_suite='test', ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pkgconfig-1.2.2/test.py new/pkgconfig-1.3.1/test.py --- old/pkgconfig-1.2.2/test.py 2016-12-02 10:33:36.000000000 +0100 +++ new/pkgconfig-1.3.1/test.py 2018-02-07 13:55:15.000000000 +0100 @@ -42,7 +42,7 @@ def test_parse(): config = pkgconfig.parse("fake-gtk+-3.0 fake-python") - nt.assert_true(('GSEAL_ENABLE', '') in config['define_macros']) + nt.assert_true(('GSEAL_ENABLE', None) in config['define_macros']) nt.assert_true('/usr/include/gtk-3.0' in config['include_dirs']) nt.assert_true('/usr/lib_gtk_foo' in config['library_dirs']) nt.assert_true('/usr/lib_python_foo' in config['library_dirs']) @@ -55,3 +55,17 @@ packages = pkgconfig.list_all() nt.assert_true('fake-gtk+-3.0' in packages) nt.assert_true('fake-python' in packages) + + +def test_variables(): + variables = pkgconfig.variables('fake-python') + + nt.assert_true('prefix' in variables) + nt.assert_true('exec_prefix' in variables) + nt.assert_true('libdir' in variables) + nt.assert_true('includedir' in variables) + + nt.assert_true(variables['prefix'] == '/usr') + nt.assert_true(variables['exec_prefix'] == '/usr') + nt.assert_true(variables['libdir'] == '/usr/lib_python_foo') + nt.assert_true(variables['includedir'] == '/usr/include')