Hello community,

here is the log from the commit of package python-pkgconfig for 
openSUSE:Factory checked in at 2020-08-18 15:08:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pkgconfig (Old)
 and      /work/SRC/openSUSE:Factory/.python-pkgconfig.new.3399 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pkgconfig"

Tue Aug 18 15:08:31 2020 rev:8 rq:826976 version:1.5.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pkgconfig/python-pkgconfig.changes        
2019-10-18 15:42:29.891633996 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pkgconfig.new.3399/python-pkgconfig.changes  
    2020-08-18 15:08:43.655982989 +0200
@@ -1,0 +2,5 @@
+Sun Aug 16 02:31:58 UTC 2020 - John Vandenberg <jay...@gmail.com>
+
+- Activate test suite, replacing nose with pytest
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pkgconfig.spec ++++++
--- /var/tmp/diff_new_pack.rbJoY3/_old  2020-08-18 15:08:47.583984613 +0200
+++ /var/tmp/diff_new_pack.rbJoY3/_new  2020-08-18 15:08:47.587984615 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pkgconfig
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,12 +23,14 @@
 Summary:        Interface Python with pkg-config
 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:  %{python_module nose}
+URL:            https://github.com/matze/pkgconfig
+Source:         
https://github.com/matze/pkgconfig/archive/v%{version}.tar.gz#/pkgconfig-%{version}.tar.gz
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
+BuildRequires:  openssl-devel
 BuildRequires:  pkgconfig
+BuildRequires:  python-dephell-rpm-macros
 BuildRequires:  python-rpm-macros
 Requires:       pkgconfig
 BuildArch:      noarch
@@ -40,6 +42,7 @@
 
 %prep
 %setup -q -n pkgconfig-%{version}
+%dephell_gensetup
 
 %build
 %python_build
@@ -48,6 +51,9 @@
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
+%check
+%pytest
+
 %files %{python_files}
 %license LICENSE
 %doc README.rst

++++++ pkgconfig-1.5.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/.gitignore 
new/pkgconfig-1.5.1/.gitignore
--- old/pkgconfig-1.5.1/.gitignore      1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/.gitignore      2019-04-01 21:26:45.000000000 +0200
@@ -0,0 +1,8 @@
+build/
+dist/
+.tox/
+.eggs/
+poetry.lock
+*.egg/*
+*.egg-info
+*.pyc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/.travis.yml 
new/pkgconfig-1.5.1/.travis.yml
--- old/pkgconfig-1.5.1/.travis.yml     1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/.travis.yml     2019-04-01 21:26:45.000000000 +0200
@@ -0,0 +1,20 @@
+language: python
+
+python:
+    - "2.6"
+    - "2.7"
+    - "3.3"
+    - "3.4"
+    - "3.5"
+    - "3.6"
+
+# Enable 3.7 without globally enabling `dist: xenial` for other build jobs.
+matrix:
+    include:
+        - python: "3.7"
+          dist: xenial
+
+install:
+    - pip install pytest
+
+script: python -m pytest
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/PKG-INFO new/pkgconfig-1.5.1/PKG-INFO
--- old/pkgconfig-1.5.1/PKG-INFO        1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/PKG-INFO        1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-Metadata-Version: 2.1
-Name: pkgconfig
-Version: 1.5.1
-Summary: Interface Python with pkg-config
-Home-page: https://github.com/matze/pkgconfig
-Author: Matthias Vogelgesang
-Author-email: matthias.vogelges...@gmail.com
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: MIT License
-Classifier: Operating System :: OS Independent
-Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Classifier: Programming Language :: Python :: 3.6
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Topic :: Software Development :: Build Tools
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/data/fake-dld-pkg.pc 
new/pkgconfig-1.5.1/data/fake-dld-pkg.pc
--- old/pkgconfig-1.5.1/data/fake-dld-pkg.pc    1970-01-01 01:00:00.000000000 
+0100
+++ new/pkgconfig-1.5.1/data/fake-dld-pkg.pc    2019-04-01 21:26:45.000000000 
+0200
@@ -0,0 +1,9 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: BetaPkg
+Description: fake package with a digit-letter-digit version number for testing
+Requires:
+Version: 1.2.3b4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/data/fake-gtk+-3.0.pc 
new/pkgconfig-1.5.1/data/fake-gtk+-3.0.pc
--- old/pkgconfig-1.5.1/data/fake-gtk+-3.0.pc   1970-01-01 01:00:00.000000000 
+0100
+++ new/pkgconfig-1.5.1/data/fake-gtk+-3.0.pc   2019-04-01 21:26:45.000000000 
+0200
@@ -0,0 +1,14 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib_gtk_foo
+includedir=/usr/include
+targets=x11 broadway
+
+gtk_binary_version=3.0.0
+gtk_host=x86_64-suse-linux-gnu
+
+Name: GTK+
+Description: GTK+ Graphical UI Library
+Version: 3.2.1
+Libs: -L${libdir} -lgtk-3 
+Cflags: -I${includedir}/gtk-3.0  -DGSEAL_ENABLE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/data/fake-openssl.pc 
new/pkgconfig-1.5.1/data/fake-openssl.pc
--- old/pkgconfig-1.5.1/data/fake-openssl.pc    1970-01-01 01:00:00.000000000 
+0100
+++ new/pkgconfig-1.5.1/data/fake-openssl.pc    2019-04-01 21:26:45.000000000 
+0200
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib/x86_64-linux-gnu
+includedir=${prefix}/include
+
+Name: OpenSSL
+Description: Secure Sockets Layer and cryptography libraries and tools
+Requires: libssl libcrypto
+Version: 1.1.0j
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/data/fake-python.pc 
new/pkgconfig-1.5.1/data/fake-python.pc
--- old/pkgconfig-1.5.1/data/fake-python.pc     1970-01-01 01:00:00.000000000 
+0100
+++ new/pkgconfig-1.5.1/data/fake-python.pc     2019-04-01 21:26:45.000000000 
+0200
@@ -0,0 +1,13 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib_python_foo
+includedir=${prefix}/include
+
+Name: Python
+Description: Python library
+Requires: 
+Version: 2.7
+Libs.private: -lpthread -ldl  -lutil
+Libs: -L${libdir} -lpython2.7
+Cflags: -I${includedir}/python2.7 
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/pyproject.toml 
new/pkgconfig-1.5.1/pyproject.toml
--- old/pkgconfig-1.5.1/pyproject.toml  2019-04-01 21:27:21.057493200 +0200
+++ new/pkgconfig-1.5.1/pyproject.toml  2019-04-01 21:26:45.000000000 +0200
@@ -4,7 +4,7 @@
 
 [tool.poetry]
 name = "pkgconfig"
-version = "1.5.1"
+version = "1.5.0"
 license = "MIT"
 description = "Interface Python with pkg-config"
 authors = ["Matthias Vogelgesang <matthias.vogelges...@gmail.com>"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/setup.cfg 
new/pkgconfig-1.5.1/setup.cfg
--- old/pkgconfig-1.5.1/setup.cfg       1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/setup.cfg       2019-04-01 21:26:45.000000000 +0200
@@ -0,0 +1,2 @@
+[pycodestyle]
+max-line-length = 119
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/setup.py new/pkgconfig-1.5.1/setup.py
--- old/pkgconfig-1.5.1/setup.py        1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/setup.py        1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-# -*- coding: utf-8 -*-
-from distutils.core import setup
-
-packages = \
-['pkgconfig']
-
-package_data = \
-{'': ['*']}
-
-setup_kwargs = {
-    'name': 'pkgconfig',
-    'version': '1.5.1',
-    'description': 'Interface Python with pkg-config',
-    'long_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 and supports Python 2.6+ 
and 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       >>> 
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   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.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",
-    'author': 'Matthias Vogelgesang',
-    'author_email': 'matthias.vogelges...@gmail.com',
-    'url': 'https://github.com/matze/pkgconfig',
-    'packages': packages,
-    'package_data': package_data,
-    'python_requires': '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*',
-}
-
-
-setup(**setup_kwargs)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/test_pkgconfig.py 
new/pkgconfig-1.5.1/test_pkgconfig.py
--- old/pkgconfig-1.5.1/test_pkgconfig.py       1970-01-01 01:00:00.000000000 
+0100
+++ new/pkgconfig-1.5.1/test_pkgconfig.py       2019-04-01 21:26:45.000000000 
+0200
@@ -0,0 +1,157 @@
+import os
+import pytest
+import pkgconfig
+
+os.environ['PKG_CONFIG_PATH'] = os.path.abspath('./data')
+PACKAGE_NAME = 'fake-gtk+-3.0'
+
+
+def test_exists():
+    assert pkgconfig.exists(PACKAGE_NAME)
+    assert pkgconfig.exists('fake-openssl')
+
+
+@pytest.mark.parametrize("version,expected", [
+    ('3.2.1', True),
+    ('==3.2.1', True),
+    ('==3.2.2', False),
+    ('> 2.2', True),
+    ('> 3.4', False),
+    ('<= 3.3.5', True),
+    ('< 2.3', False),
+])
+def test_version(version, expected):
+    assert pkgconfig.installed(PACKAGE_NAME, version) == expected
+
+
+@pytest.mark.parametrize("version,expected", [
+    ('1.1.0j', True),
+    ('==1.1.0j', True),
+    ('==1.1.0k', False),
+    ('>= 1.1.0', True),
+    ('> 1.2.0', False),
+    ('< 1.2.0', True),
+    ('< 1.1.0', False),
+    ('>= 1.1', True),
+    ('> 1.2', False),
+    ('< 1.2', True),
+    ('< 1.1', False),
+    ('>= 1.1.0c', True),
+    ('>= 1.1.0k', False),
+    # PLEASE NOTE:
+    # the letters have no semantics, except string ordering, see also the
+    # comment in the test below.
+    # comparing release with beta, like "1.2.3" > "1.2.3b" does not work.
+])
+def test_openssl(version, expected):
+    assert pkgconfig.installed('fake-openssl', version) == expected
+
+
+@pytest.mark.parametrize("version,expected", [
+    ('1.2.3b4', True),
+    ('==1.2.3b4', True),
+    ('==1.2.3', False),
+    ('>= 1.2.3b3', True),
+    ('< 1.2.3b5', True),
+    # PLEASE NOTE:
+    # sadly, when looking at all (esp. non-python) libraries out there, there
+    # is no agreement on the semantics of letters appended to version numbers.
+    # e.g. for a release candidate, some might use "c", but other also might
+    # use "rc" or whatever. stuff like openssl does not use the letters to
+    # represent release status, but rather minor updates using a-z.
+    # so, as there is no real standard / agreement, we can NOT assume any
+    # advanced semantics here (like we could for python packages).
+    # thus we do NOT implement any special semantics for the letters,
+    # except string ordering
+    # thus, comparing a version with a letter-digits appendix to one without
+    # may or may not give the desired result.
+    # e.g. python packages use a1 for alpha 1, b2 for beta 2, c3 for release
+    # candidate 3 and <nothing> for release.
+    # we do not implement this semantics, "1.2.3" > "1.2.3b1" does not work.
+])
+def test_dld_pkg(version, expected):
+    assert pkgconfig.installed('fake-dld-pkg', version) == expected
+
+
+def test_modversion():
+    assert pkgconfig.modversion(PACKAGE_NAME) == '3.2.1'
+    assert pkgconfig.modversion('fake-openssl') == '1.1.0j'
+
+    with pytest.raises(pkgconfig.PackageNotFoundError):
+        pkgconfig.modversion('doesnotexist')
+
+
+def test_cflags():
+    flags = pkgconfig.cflags(PACKAGE_NAME)
+
+    for flag in flags.split(' '):
+        assert flag in ('-DGSEAL_ENABLE', '-I/usr/include/gtk-3.0')
+
+    with pytest.raises(pkgconfig.PackageNotFoundError):
+        pkgconfig.cflags('doesnotexist')
+
+
+def test_libs():
+    flags = pkgconfig.libs(PACKAGE_NAME)
+
+    for flag in flags.split(' '):
+        assert flag in ('-L/usr/lib_gtk_foo', '-lgtk-3')
+
+    with pytest.raises(pkgconfig.PackageNotFoundError):
+        pkgconfig.libs('doesnotexist')
+
+
+def test_libs_static():
+    flags = pkgconfig.libs('fake-python', static=True)
+    flags = flags.split(' ')
+    assert '-lpthread' in flags
+    assert '-ldl' in flags
+    assert '-lutil' in flags
+
+
+def test_parse():
+    config = pkgconfig.parse("fake-gtk+-3.0 fake-python")
+
+    assert ('GSEAL_ENABLE', None) in config['define_macros']
+    assert '/usr/include/gtk-3.0' in config['include_dirs']
+    assert '/usr/lib_gtk_foo' in config['library_dirs']
+    assert '/usr/lib_python_foo' in config['library_dirs']
+    assert 'gtk-3' in config['libraries']
+
+    assert '/usr/include/python2.7' in config['include_dirs']
+
+    with pytest.raises(pkgconfig.PackageNotFoundError):
+        pkgconfig.parse('doesnotexist')
+
+
+def test_parse_static():
+    config = pkgconfig.parse("fake-python", static=True)
+    assert '/usr/lib_python_foo' in config['library_dirs']
+    assert '/usr/include/python2.7' in config['include_dirs']
+    assert 'python2.7' in config['libraries']
+    assert 'pthread' in config['libraries']
+    assert 'dl' in config['libraries']
+    assert 'util' in config['libraries']
+
+
+def test_listall():
+    packages = pkgconfig.list_all()
+    assert 'fake-gtk+-3.0' in packages
+    assert 'fake-python' in packages
+
+
+def test_variables():
+    variables = pkgconfig.variables('fake-python')
+
+    assert 'prefix' in variables
+    assert 'exec_prefix' in variables
+    assert 'libdir' in variables
+    assert 'includedir' in variables
+
+    assert variables['prefix'] == '/usr'
+    assert variables['exec_prefix'] == '/usr'
+    assert variables['libdir'] == '/usr/lib_python_foo'
+    assert variables['includedir'] == '/usr/include'
+
+    with pytest.raises(pkgconfig.PackageNotFoundError):
+        pkgconfig.variables('doesnotexist')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pkgconfig-1.5.1/tox.ini new/pkgconfig-1.5.1/tox.ini
--- old/pkgconfig-1.5.1/tox.ini 1970-01-01 01:00:00.000000000 +0100
+++ new/pkgconfig-1.5.1/tox.ini 2019-04-01 21:26:45.000000000 +0200
@@ -0,0 +1,6 @@
+[tox]
+envlist = py{26,27,33,34,35,36,37}
+
+[testenv]
+deps = pytest
+commands= pytest


Reply via email to