forked from pool/python-humanfriendly
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user