File python-progressbar2.spec of Package python-progressbar2
#
# spec file for package python-progressbar2
#
# Copyright (c) 2022 Marcus Schäfer
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# If they aren't provided by a system installed macro, define them
%{!?_defaultdocdir: %global _defaultdocdir %{_datadir}/doc}
%if 0%{?suse_version} && 0%{?suse_version} < 1600
%global __python3 /usr/bin/python3.11
%global python3_pkgversion 311
%else
%{!?__python3: %global __python3 /usr/bin/python3}
%{!?python3_pkgversion:%global python3_pkgversion 3}
%endif
%if %{undefined python3_sitelib}
%global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%endif
%if %{undefined python3_version}
%global python3_version %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}.{0.minor}'.format(sys.version_info))")
%endif
%if %{undefined python3_version_nodots}
%global python3_version_nodots %(%{__python3} -Esc "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))")
%endif
%if 0%{?debian} || 0%{?ubuntu}
%global is_deb 1
%global pygroup python
%global sysgroup admin
%global develsuffix dev
%else
%global pygroup Development/Languages/Python
%global sysgroup System/Management
%global develsuffix devel
%endif
Name: python-progressbar2
Version: 4.0.0
Release: 0
Summary: Python library to provide visual text-based progress to long running operations
License: BSD-3-Clause
Group: %{pygroup}
URL: https://github.com/WoLpH/python-progressbar
Source: progressbar2-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{_vendor}" == "debbuild"
# Needed to set Maintainer in output debs
Packager: Marcus Schaefer <marcus.schaefer@gmail.com>
%endif
BuildRequires: python%{python3_pkgversion}-%{develsuffix} >= 3.6
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-freezegun
#BuildRequires: python%{python3_pkgversion}-pytest
BuildRequires: python%{python3_pkgversion}-python-utils >= 3.0.0
BuildRequires: python%{python3_pkgversion}-six
%if 0%{?fedora} || 0%{?suse_version}
BuildRequires: fdupes
%endif
BuildArch: noarch
%description
A Python Progressbar library to provide visual (yet text based)
progress to long running operations.
# python3-progressbar2
%package -n python%{python3_pkgversion}-progressbar2
Summary: Python library to provide visual text-based progress to long running operations
Group: %{pygroup}
Requires: python%{python3_pkgversion} >= 3.6
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-python-utils >= 3.0.0
%description -n python%{python3_pkgversion}-progressbar2
Python3 Progressbar library to provide visual (yet text based)
progress to long running operations.
%prep
%setup -q -n progressbar2-%{version}
rm pytest.ini
%build
# no compile action for this module
%install
# Install Python 3 version
install -d -m 644 %{buildroot}/usr/share/doc/python-progressbar2
%{__python3} setup.py install --prefix=%{_prefix} --root=%{buildroot} %{?is_deb:--install-layout=deb}
mkdir -p %{buildroot}/%{_defaultdocdir}/python-progressbar2
%files -n python%{python3_pkgversion}-progressbar2
%dir %{_defaultdocdir}/python-progressbar2
%{python3_sitelib}/progressbar*
%changelog