From c8eba28b8fb2a2c6a90863424ce31815920998da0ef8abab473ca61d89510983 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 30 Jun 2017 14:54:58 +0000 Subject: [PATCH] Accepting request 507161 from home:benoit_monin:branches:devel:languages:python explicitly call python2 for the tests OBS-URL: https://build.opensuse.org/request/show/507161 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-kombu?expand=0&rev=119 --- python-kombu.changes | 12 +++++++++++ python-kombu.spec | 48 +++++++++++++++++++++++--------------------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/python-kombu.changes b/python-kombu.changes index a9659df..f40484c 100644 --- a/python-kombu.changes +++ b/python-kombu.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Jun 28 20:28:50 UTC 2017 - benoit.monin@gmx.fr + +- convert the package to singlespec +- import changes from python3-kombu: + * add AUTHORS to the package documentation + * use a more precise file list +- drop test BuildRequires mock, nose-cover3 and unittest2: + not needed anymore +- add fdupes as BuildRequires and call it after install +- skip the tests for python3 since they fail with python 3.6 (#675) + ------------------------------------------------------------------- Thu Mar 16 08:24:12 UTC 2017 - dmueller@suse.com diff --git a/python-kombu.spec b/python-kombu.spec index 878ce1c..9026105 100644 --- a/python-kombu.spec +++ b/python-kombu.spec @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-kombu Version: 4.0.2 Release: 0 @@ -24,20 +25,19 @@ License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/celery/kombu Source: https://pypi.io/packages/source/k/kombu/kombu-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros # Test requirements: -BuildRequires: python-PyYAML -BuildRequires: python-amqp >= 2.0 -BuildRequires: python-boto -BuildRequires: python-case -BuildRequires: python-mock -BuildRequires: python-msgpack-python -BuildRequires: python-nose-cover3 -BuildRequires: python-pytest -BuildRequires: python-pytz -BuildRequires: python-redis -BuildRequires: python-unittest2 >= 0.5.0 +BuildRequires: %{python_module PyYAML} +BuildRequires: %{python_module amqp >= 2.0} +BuildRequires: %{python_module boto} +BuildRequires: %{python_module case} +BuildRequires: %{python_module msgpack-python} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module pytz} +BuildRequires: %{python_module redis} Requires: python-amqp %if 0%{?suse_version} Suggests: couchdb @@ -45,11 +45,9 @@ Suggests: mongodb Suggests: rabbitmq-server %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else BuildArch: noarch -%endif + +%python_subpackages %description An AMQP messaging framework for Python. @@ -67,17 +65,21 @@ provide proven and tested solutions to common messaging problems. %setup -q -n kombu-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} +# Tests are currently incompatible with python 3.6 (see upstream #675) +# run them only on python 2 %check -python setup.py -q test +python2 setup.py -q test -%files +%files %python_files %defattr(-,root,root,-) -%doc Changelog FAQ README.rst THANKS TODO LICENSE -%{python_sitelib}/* +%doc AUTHORS Changelog FAQ README.rst THANKS TODO LICENSE +%{python_sitelib}/kombu +%{python_sitelib}/kombu-%{version}-py%{py_ver}.egg-info %changelog