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

+- Fix source URL.
+- Implement single-spec version.
+- Add tests.
+- Add licenses and other documentation files.

OBS-URL: https://build.opensuse.org/request/show/492324
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-uritemplate?expand=0&rev=6
This commit is contained in:
Todd R 2017-05-06 12:20:43 +00:00 committed by Git OBS Bridge
parent 528e23b971
commit d743cd1672
2 changed files with 30 additions and 14 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon May 1 16:24:14 UTC 2017 - toddrme2178@gmail.com
- Fix source URL.
- Implement single-spec version.
- Add tests.
- Add licenses and other documentation files.
-------------------------------------------------------------------
Thu Oct 27 15:50:21 UTC 2016 - rjschwei@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-uritemplate
#
# 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,9 +16,9 @@
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%bcond_without tests
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-uritemplate
Version: 3.0.0
Release: 0
@ -26,16 +26,16 @@ Summary: URI Template Expansison
License: Apache-2.0
Group: Development/Languages/Python
Url: https://pypi.python.org/pypi/uritemplate
Source0: uritemplate-%{version}.tar.gz
Source: http://files.pythonhosted.org/packages/source/u/uritemplate/uritemplate-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module simplejson}
Requires: python-simplejson
BuildRequires: python-setuptools
BuildRequires: python-simplejson
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
This is a Python implementation of RFC6570, URI Template, and can expand
@ -45,14 +45,22 @@ templates up to and including Level 4 in that specification
%setup -q -n uritemplate-%{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}
%files
%if %{with tests}
%check
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python tests/test_uritemplate.py
}
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc README.rst
%doc AUTHORS.rst HISTORY.rst LICENSE LICENSE.* README.rst
%{python_sitelib}/*
%changelog