forked from pool/python-requests-unixsocket
- Switch to singlespec to support all python variants
- Make sure we run tests OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-unixsocket?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
34bd6e622c
commit
6f63a04e41
@@ -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
|
||||
|
Reference in New Issue
Block a user