15
0

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

- Implement single-spec version.
- Update to version 4.4.1
  * No changelog

OBS-URL: https://build.opensuse.org/request/show/521724
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-humanfriendly?expand=0&rev=5
This commit is contained in:
Todd R
2017-09-06 16:38:28 +00:00
committed by Git OBS Bridge
parent d2db72ddf9
commit c0dd25304f
4 changed files with 56 additions and 15 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ecbbb27444b3151a1d2e4366af938151597bdfe1a9d645595804df34e3e8c6ac
size 49310

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f1ebb406d37478228b92543c12c27c9a827782d8d241260b3a06512c7f7c3a5e
size 222266

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Sep 6 16:36:13 UTC 2017 - toddrme2178@gmail.com
- Implement single-spec version.
- Update to version 4.4.1
* No changelog
-------------------------------------------------------------------
Mon Oct 10 19:21:56 UTC 2016 - mardnh@gmx.de

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-humanfriendly
#
# 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,17 +16,33 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
# Dependency loop with colorlogs
%bcond_with test
Name: python-humanfriendly
Version: 2.1
Version: 4.4.1
Release: 0
Summary: Human friendly input/output for text interfaces using Python
License: MIT
Group: Development/Languages/Python
Url: https://github.com/xolox/%{name}
Source: https://pypi.io/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz
BuildRequires: python-setuptools
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: https://github.com/xolox/humanfriendly
Source: https://files.pythonhosted.org/packages/source/h/humanfriendly/humanfriendly-%{version}.tar.gz
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: python-monotonic
%if %{with test}
BuildRequires: %{python_module coloredlogs >= 2}
%endif
%ifpython2
Requires: python-monotonic
%endif
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
The functions and classes in the humanfriendly package can be used to make
@@ -46,17 +62,35 @@ text interfaces more user friendly.
%setup -q -n humanfriendly-%{version}
%build
python setup.py build
%python_build
%install
# TODO properly build docs
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
%python_clone -a %{buildroot}%{_bindir}/humanfriendly
%{python_expand chmod a+x %{buildroot}%{$python_sitelib}/humanfriendly/tests.py
sed -i "s|#!/usr/bin/env python|#!%__$python|" %{buildroot}%{$python_sitelib}/humanfriendly/tests.py
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/humanfriendly/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/humanfriendly/
%fdupes %{buildroot}%{$python_sitelib}
}
%files
%post
%python_install_alternative humanfriendly
%postun
%python_uninstall_alternative humanfriendly
%if %{with test}
%check
%python_exec setup.py test
popd
%endif
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{_bindir}/humanfriendly
%python_alternative %{_bindir}/humanfriendly
%{python_sitelib}/humanfriendly
%{python_sitelib}/humanfriendly-%{version}-py%{py_ver}.egg-info
%{python_sitelib}/humanfriendly-%{version}-py*.egg-info
%changelog