From bc9ff588ac225af71d4c8a2c829e384afca4c7e966aecabc45795fc026b6dfe0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Sat, 9 Feb 2019 13:21:50 +0000 Subject: [PATCH 1/4] Accepting request 672997 from home:mcepl:branches:devel:languages:python - Switch to multibuild (with separate test) to avoid large dependencies on the main package. OBS-URL: https://build.opensuse.org/request/show/672997 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=37 --- _multibuild | 3 +++ python-tqdm.changes | 6 ++++++ python-tqdm.spec | 19 ++++++++++++++++++- 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-tqdm.changes b/python-tqdm.changes index 048b824..56f1c92 100644 --- a/python-tqdm.changes +++ b/python-tqdm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Feb 9 13:37:08 CET 2019 - Matej Cepl + +- Switch to multibuild (with separate test) to avoid large + dependencies on the main package. + ------------------------------------------------------------------- Mon Dec 31 14:21:07 UTC 2018 - Thomas Bechtold diff --git a/python-tqdm.spec b/python-tqdm.spec index 23d36a7..8484d36 100644 --- a/python-tqdm.spec +++ b/python-tqdm.spec @@ -1,7 +1,7 @@ # # spec file for package python-tqdm # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -18,7 +18,18 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define test 1 +%bcond_without test +%else +%bcond_with test +%endif +%if %{with test} +Name: python-tqdm-%{flavor} +%else Name: python-tqdm +%endif Version: 4.28.1 Release: 0 Summary: An extensible progress meter @@ -33,6 +44,7 @@ BuildRequires: python-rpm-macros Requires(post): update-alternatives Requires(postun): update-alternatives BuildArch: noarch +%if %{with test} # SECTION test requirements BuildRequires: %{python_module jupyter_ipython} BuildRequires: %{python_module jupyter_ipywidgets} @@ -40,6 +52,7 @@ BuildRequires: %{python_module nose} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pandas} # /SECTION +%endif %python_subpackages %description @@ -66,11 +79,14 @@ and does not require ncurses. %python_uninstall_alternative tqdm %check +%if %{with test} %{python_expand export PATH="$PATH:%{buildroot}%{_bindir}" export PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%%{$python_bin_suffix} --ignore-files="tests_perf\.py" --ignore-files="tests_synchronisation\.py" tqdm/ } +%endif +%if ! %{with test} %files %{python_files} %doc README.rst logo.png %doc examples/ @@ -80,5 +96,6 @@ nosetests-%%{$python_bin_suffix} --ignore-files="tests_perf\.py" --ignore-files= %{python_sitelib}/tqdm/* %{python_sitelib}/tqdm-%{version}-py%{py_ver}.egg-info/* %python_alternative %{_bindir}/tqdm +%endif %changelog From 9238e673faf47a5f74398afc529d1f2e4d3a939f11530933f9a676e9f46c1d12 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 12 Feb 2019 12:07:26 +0000 Subject: [PATCH 2/4] Accepting request 673648 from home:mcepl:branches:devel:languages:python - Remove installed files after running the testsuite OBS-URL: https://build.opensuse.org/request/show/673648 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=38 --- python-tqdm.changes | 5 +++++ python-tqdm.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/python-tqdm.changes b/python-tqdm.changes index 56f1c92..f934dcc 100644 --- a/python-tqdm.changes +++ b/python-tqdm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Feb 12 10:45:37 UTC 2019 - Matej Cepl + +- Remove installed files after running the testsuite + ------------------------------------------------------------------- Sat Feb 9 13:37:08 CET 2019 - Matej Cepl diff --git a/python-tqdm.spec b/python-tqdm.spec index 8484d36..a2ed050 100644 --- a/python-tqdm.spec +++ b/python-tqdm.spec @@ -80,9 +80,9 @@ and does not require ncurses. %check %if %{with test} -%{python_expand export PATH="$PATH:%{buildroot}%{_bindir}" -export PYTHONPATH=%{buildroot}%{$python_sitelib} +%{python_expand export PATH="$PATH:%{buildroot}%{_bindir}" PYTHONPATH=%{buildroot}%{$python_sitelib} nosetests-%%{$python_bin_suffix} --ignore-files="tests_perf\.py" --ignore-files="tests_synchronisation\.py" tqdm/ +rm -rf %{buildroot}%{$python_sitelib} } %endif From f47a9a826b1ee016f7fd4c14181adb93ab33d69bd47a5993a3c86e71f83f12bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 12 Feb 2019 12:10:55 +0000 Subject: [PATCH 3/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=39 --- python-tqdm.spec | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) 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/ From 5c4a243e1cf9d9e99d8ebade1d4b4d18f2428c6e466a522f29bcf9ece3000d93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 12 Feb 2019 12:14:05 +0000 Subject: [PATCH 4/4] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-tqdm?expand=0&rev=40 --- python-tqdm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-tqdm.spec b/python-tqdm.spec index cb92d4f..c7b2ccb 100644 --- a/python-tqdm.spec +++ b/python-tqdm.spec @@ -49,7 +49,7 @@ BuildRequires: %{python_module jupyter_ipywidgets} BuildRequires: %{python_module nose} BuildRequires: %{python_module numpy} BuildRequires: %{python_module pandas} -BuildRequires: %{python_module tdqm} +BuildRequires: %{python_module tqdm} # /SECTION %endif %python_subpackages