14
0

Accepting request 494496 from home:TheBlackCat:branches:devel:languages:python

- Implement single-spec version.
- Fix source URL.
- Update to version 1.4.2

OBS-URL: https://build.opensuse.org/request/show/494496
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-file?expand=0&rev=2
This commit is contained in:
Todd R
2017-05-11 01:33:44 +00:00
committed by Git OBS Bridge
parent d814f664bd
commit 2be4a0b21b
4 changed files with 32 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-requests-file
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017 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
@@ -16,24 +16,26 @@
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-requests-file
Version: 1.4
Version: 1.4.2
Release: 0
Summary: File transport adapter for Requests
License: Apache-2.0
Group: Development/Languages/Python
Url: http://github.com/dashea/requests-file
Source: https://pypi.python.org/packages/source/r/requests-file/requests-file-%{version}.tar.gz
BuildRequires: python-devel
BuildRequires: python-requests
BuildRequires: python-setuptools
Source: https://files.pythonhosted.org/packages/source/r/requests-file/requests-file-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module requests}
Requires: python-requests
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
Requests-File is a transport adapter for use with the Requests Python
@@ -43,15 +45,18 @@ library to allow local filesystem access via file:// URLs.
%setup -q -n requests-file-%{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}
%if %{with tests}
%check
python setup.py test
%python_exec setup.py test
%endif
%files
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitelib}/*