diff --git a/python-tqdm.spec b/python-tqdm.spec new file mode 100644 index 0000000000000000000000000000000000000000..b19d023622d2e2d3ab48e925e932e43cc5131b15 --- /dev/null +++ b/python-tqdm.spec @@ -0,0 +1,106 @@ +%define anolis_release 1 + +%global modname tqdm +%global srcname %{modname} + +%bcond_with tests + +Name: python-%{modname} +Version: 4.65.0 +Release: %{anolis_release}%{dist} + +Summary: Fast, Extensible Progress Meter + +# see PACKAGE-LICENSING for more info +License: MPLv2.0 and MIT +URL: https://github.com/tqdm/tqdm +Source0: %{pypi_source} + +BuildArch: noarch + +BuildRequires: python3-devel +BuildRequires: python3-wheel +BuildRequires: python3-setuptools_scm+toml + +%if %{with tests} +# tox.ini contains coverage and unpackaged dependencies (nbval) +# We will use pytest directly +BuildRequires: python3-pytest +BuildRequires: python3-pytest-asyncio >= 0.17 +BuildRequires: python3-pytest-timeout + +# optional test deps +BuildRequires: python3-tkinter +BuildRequires: python3-dask +BuildRequires: python3-numpy +BuildRequires: python3-pandas +BuildRequires: python3-rich +%endif + +%global _description \ +tqdm (read taqadum, تقدّم) means "progress" in Arabic.\ +\ +Instantly make your loops show a smart progress meter - just wrap any iterable\ +with "tqdm(iterable)", and you are done! + +%description %{_description} + +%package -n python3-%{modname} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{modname}} + +%description -n python3-%{modname} %{_description} + +Python 3 version. + +%package -n python3-%{modname}-doc +Summary: Documentation files for python3-%{modname} +Requires: python3-%{modname} = %{EVR} +BuildArch: noarch + +%description -n python3-%{modname}-doc +The python3-%{modname}-doc package contains documentation files for python3-%{modname}. + +%prep +%autosetup -n %{modname}-%{version} +chmod -x tqdm/completion.sh + +# https://github.com/tqdm/tqdm/pull/1292 +echo 'include tqdm/tqdm.1' >> MANIFEST.in +echo 'include tqdm/completion.sh' >> MANIFEST.in + +%generate_buildrequires +%pyproject_buildrequires -r + +%build +%pyproject_wheel + +%install +%pyproject_install +%pyproject_save_files %{modname} +install -Dpm0644 \ + %{buildroot}%{python3_sitelib}/tqdm/tqdm.1 \ + %{buildroot}%{_mandir}/man1/tqdm.1 +install -Dpm0644 \ + %{buildroot}%{python3_sitelib}/tqdm/completion.sh \ + %{buildroot}%{_datadir}/bash-completion/completions/tqdm.bash + +%check +%if %{with tests} +%pytest +%endif + +%files -n python3-%{modname} -f %{pyproject_files} +%license LICENCE +%{_bindir}/tqdm +%{_mandir}/man1/tqdm.1* +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/tqdm.bash + +%files -n python3-%{modname}-doc +%doc README.rst examples + +%changelog +* Mon Apr 03 2023 yuanhui - 4.65.0 +- Init package from upstream diff --git a/tqdm-4.65.0.tar.gz b/tqdm-4.65.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c3e3280bf3def25980f39901e8516f3af1e7c95c Binary files /dev/null and b/tqdm-4.65.0.tar.gz differ