15
0
forked from pool/python-pdd

Accepting request 807599 from home:pgajdos:python

submit

OBS-URL: https://build.opensuse.org/request/show/807599
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pdd?expand=0&rev=5
This commit is contained in:
Tomáš Chvátal
2020-05-20 11:28:23 +00:00
committed by Git OBS Bridge
parent 03a74e87cb
commit c7f36aea79
2 changed files with 21 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pdd
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,6 @@
# pdd is not available for Python 2
%define skip_python2 1
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pdd
Version: 1.4
@@ -26,20 +25,21 @@ Release: 0
Summary: Tiny date, time diff calculator with timers
License: GPL-3.0-only
Group: Development/Languages/Python
Url: https://github.com/jarun/pdd
URL: https://github.com/jarun/pdd
Source: https://files.pythonhosted.org/packages/source/p/pdd/pdd-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-python-dateutil
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil}
# /SECTION
BuildRequires: fdupes
Requires: python-python-dateutil
Requires: python-setuptools
BuildArch: noarch
%python_subpackages
%description
@@ -56,16 +56,23 @@ mv pdd.py pdd
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/pdd
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
chmod 755 pdd
%pytest test.py
%post
%python_install_alternative pdd
%postun
%python_uninstall_alternative pdd
%files %{python_files}
%doc README.md CHANGELOG
%license LICENSE
%python3_only %{_bindir}/pdd
%python_alternative %{_bindir}/pdd
%{python_sitelib}/*
%changelog