From 453a1718b3e8342b68d6e133908e78160ecafb8689940a46e4706cf95769c4e2 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 4 Jul 2017 05:22:13 +0000 Subject: [PATCH] Accepting request 507532 from home:okurz:branches:devel:languages:python Convert to singlespec OBS-URL: https://build.opensuse.org/request/show/507532 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanize?expand=0&rev=5 --- python-humanize.changes | 5 +++++ python-humanize.spec | 26 +++++++++++++++++--------- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/python-humanize.changes b/python-humanize.changes index eb1d2c7..896394a 100644 --- a/python-humanize.changes +++ b/python-humanize.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 1 14:54:14 UTC 2017 - okurz@suse.com + +- Convert to singlespec + ------------------------------------------------------------------- Fri Dec 18 09:06:59 UTC 2015 - mimi.vx@gmail.com diff --git a/python-humanize.spec b/python-humanize.spec index 745f4ce..7734901 100644 --- a/python-humanize.spec +++ b/python-humanize.spec @@ -1,7 +1,7 @@ # # spec file for package python-humanize # -# Copyright (c) 2015 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,16 +16,21 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + Name: python-humanize +%global modname humanize Version: 0.5.1 Release: 0 Summary: Python humanize utilities License: MIT Group: Development/Languages/Python -Url: http://github.com/jmoiron/humanize -Source: http://pypi.python.org/packages/source/h/humanize/humanize-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Url: http://github.com/jmoiron/%{modname} +Source: https://pypi.io/packages/source/h/%{modname}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros 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()")} @@ -33,22 +38,25 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %endif +%python_subpackages + %description This modest package contains various common humanization utilities, like turning a number into a fuzzy human readable duration ('3 minutes ago') or into a human readable size or throughput. %prep -%setup -q -n humanize-%{version} +%setup -q -n %{modname}-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install %find_lang humanize +%fdupes %{buildroot}%{_prefix} -%files -f humanize.lang +%files %{python_files} %defattr(-,root,root,-) %doc LICENCE README.rst %{python_sitelib}/*