15
0
forked from pool/python-odorik

Accepting request 611351 from devel:languages:python:singlespec-staging

clean SPEC file

OBS-URL: https://build.opensuse.org/request/show/611351
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-odorik?expand=0&rev=11
This commit is contained in:
Tomáš Chvátal
2018-05-22 16:40:58 +00:00
committed by Git OBS Bridge
parent 6d49c77bbd
commit 1873af21f0
2 changed files with 36 additions and 24 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-odorik
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 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,28 +16,26 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-odorik
Version: 0.5
Release: 0
Summary: Python module for Odorik API
License: GPL-3.0+
License: GPL-3.0-or-later
Group: Development/Languages/Python
Url: http://cihar.com/software/odorik/
Source: https://pypi.python.org/packages/source/o/odorik/odorik-%{version}.tar.bz2
BuildRequires: python-devel
BuildRequires: python-httpretty
BuildRequires: python-pytest
BuildRequires: python-python-dateutil
BuildRequires: python-sphinx
BuildRequires: python-xdg
URL: http://cihar.com/software/odorik/
Source: https://files.pythonhosted.org/packages/source/o/odorik/odorik-%{version}.tar.bz2
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module httpretty}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
BuildRequires: %{python_module pyxdg}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil
Requires: python-xdg
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
Python module to work with Odorik API.
@@ -46,22 +44,23 @@ Python module to work with Odorik API.
%setup -q -n odorik-%{version}
%build
python setup.py build
make -C docs man
%python_build
make %{?_smp_mflags} -C docs man
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
%python_install
install -d %{buildroot}%{_mandir}/man1
install -m 644 docs/_build/man/odorik.1 %{buildroot}%{_mandir}/man1
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
py.test odorik
%python_expand pytest-%{$python_version} odorik
%files
%defattr(-,root,root,-)
%doc NEWS.rst LICENSE README.rst
%files %{python_files}
%license LICENSE
%doc NEWS.rst README.rst
%{python_sitelib}/*
%{_mandir}/man1/*
%{_bindir}/*
%python3_only %{_mandir}/man1/*
%python3_only %{_bindir}/*
%changelog