diff --git a/python-tqdm.spec b/python-tqdm.spec index a2ed050..cb92d4f 100644 --- a/python-tqdm.spec +++ b/python-tqdm.spec @@ -22,14 +22,12 @@ %if "%{flavor}" == "test" %define test 1 %bcond_without test +%define suffix -test %else %bcond_with test +%define suffix %{nil} %endif -%if %{with test} -Name: python-tqdm-%{flavor} -%else -Name: python-tqdm -%endif +Name: python-tqdm%{suffix} Version: 4.28.1 Release: 0 Summary: An extensible progress meter @@ -51,6 +49,7 @@ BuildRequires: %{python_module jupyter_ipywidgets} BuildRequires: %{python_module nose} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pandas} +BuildRequires: %{python_module tdqm} # /SECTION %endif %python_subpackages @@ -68,25 +67,28 @@ and does not require ncurses. %python_build %install +%if !%{with test} %python_install %python_clone -a %{buildroot}%{_bindir}/tqdm %python_expand %fdupes %{buildroot}%{$python_sitelib} +%endif +%if !%{with test} %post %{python_install_alternative tqdm tqdm.1} %postun %python_uninstall_alternative tqdm +%endif -%check %if %{with test} -%{python_expand export PATH="$PATH:%{buildroot}%{_bindir}" PYTHONPATH=%{buildroot}%{$python_sitelib} +%check +%{python_expand PYTHONPATH=%{$python_sitelib} nosetests-%%{$python_bin_suffix} --ignore-files="tests_perf\.py" --ignore-files="tests_synchronisation\.py" tqdm/ -rm -rf %{buildroot}%{$python_sitelib} } %endif -%if ! %{with test} +%if !%{with test} %files %{python_files} %doc README.rst logo.png %doc examples/