diff --git a/python-requests-unixsocket.changes b/python-requests-unixsocket.changes index d52db0b..0450c88 100644 --- a/python-requests-unixsocket.changes +++ b/python-requests-unixsocket.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 5 12:40:55 UTC 2019 - Tomáš Chvátal + +- Switch to singlespec to support all python variants +- Make sure we run tests + ------------------------------------------------------------------- Fri Mar 11 08:27:38 UTC 2016 - tbechtold@suse.com diff --git a/python-requests-unixsocket.spec b/python-requests-unixsocket.spec index 19eceb3..238fc6e 100644 --- a/python-requests-unixsocket.spec +++ b/python-requests-unixsocket.spec @@ -1,7 +1,7 @@ # # spec file for package python-requests-unixsocket # -# Copyright (c) 2016 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -12,43 +12,55 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-requests-unixsocket Version: 0.1.5 Release: 0 -License: Apache-2 Summary: Use requests to talk HTTP via a UNIX domain socket -Url: https://github.com/msabramo/requests-unixsocket +License: Apache-2.0 Group: Development/Languages/Python -Source: https://pypi.python.org/packages/source/r/requests-unixsocket/requests-unixsocket-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-pbr +URL: https://github.com/msabramo/requests-unixsocket +Source: https://files.pythonhosted.org/packages/source/r/requests-unixsocket/requests-unixsocket-%{version}.tar.gz +BuildRequires: %{python_module pbr} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros Requires: python-requests >= 1.1 Requires: python-urllib3 >= 1.8 -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 +# SECTION test requirements +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module requests >= 1.1} +BuildRequires: %{python_module urllib3 >= 1.8} +BuildRequires: %{python_module waitress} +# /SECTION +%python_subpackages %description Use requests to talk HTTP via a UNIX domain socket %prep %setup -q -n requests-unixsocket-%{version} +# do not require additional test deps +sed -i -e '/addopts/d' pytest.ini %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%files -%defattr(-,root,root,-) -%doc ChangeLog LICENSE README.rst +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v requests_unixsocket/tests + +%files %{python_files} +%doc AUTHORS ChangeLog README.rst +%license LICENSE %{python_sitelib}/* %changelog