Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-bandit for openSUSE:Factory 
checked in at 2021-11-08 17:24:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-bandit (Old)
 and      /work/SRC/openSUSE:Factory/.python-bandit.new.1890 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-bandit"

Mon Nov  8 17:24:15 2021 rev:9 rq:929843 version:1.7.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-bandit/python-bandit.changes      
2021-03-10 08:58:36.934973228 +0100
+++ /work/SRC/openSUSE:Factory/.python-bandit.new.1890/python-bandit.changes    
2021-11-08 17:25:02.376727010 +0100
@@ -1,0 +2,7 @@
+Wed Oct 27 12:05:40 UTC 2021 - pgaj...@suse.com
+
+- %check: use %pyunittest rpm macro
+- added sources
+  + _multibuild
+
+-------------------------------------------------------------------

New:
----
  _multibuild

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-bandit.spec ++++++
--- /var/tmp/diff_new_pack.gfpspu/_old  2021-11-08 17:25:02.808727294 +0100
+++ /var/tmp/diff_new_pack.gfpspu/_new  2021-11-08 17:25:02.816727299 +0100
@@ -17,10 +17,18 @@
 
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
-# Tests require python-hacking, which isn't compatible with pycodestyle
-%bcond_without  builddocs
+%global flavor @BUILD_FLAVOR@%{nil}
+%if "%{flavor}" == "test"
+%define psuffix -test
+%bcond_without test
+%else
+%define psuffix %{nil}
+%bcond_with test
+%endif
 # CLI tool, no module
 %define pythons python3
+# Tests require python-hacking, which isn't compatible with pycodestyle
+%bcond_without  builddocs
 Name:           python-bandit
 Version:        1.7.0
 Release:        0
@@ -29,8 +37,20 @@
 URL:            https://github.com/PyCQA/bandit
 Source:         
https://files.pythonhosted.org/packages/source/b/bandit/bandit-%{version}.tar.gz
 Patch0:         remove-non-test-deps.patch
+BuildRequires:  fdupes
+BuildRequires:  python-rpm-macros
+Requires:       python-GitPython >= 1.0.1
+Requires:       python-PyYAML >= 5.3.1
+Requires:       python-six >= 1.10.0
+Requires:       python-stestr >= 1.0.0
+Requires:       python-stevedore >= 1.20.0
+Requires(post): update-alternatives
+Requires(postun):update-alternatives
+BuildArch:      noarch
+%if %{with test}
 BuildRequires:  %{python_module GitPython >= 1.0.1}
 BuildRequires:  %{python_module PyYAML >= 5.3.1}
+BuildRequires:  %{python_module bandit == %{version}}
 BuildRequires:  %{python_module beautifulsoup4 >= 4.8.0}
 BuildRequires:  %{python_module fixtures >= 3.0.0}
 BuildRequires:  %{python_module mock >= 3.0.5}
@@ -43,22 +63,12 @@
 BuildRequires:  %{python_module testrepository >= 0.0.18}
 BuildRequires:  %{python_module testscenarios >= 0.5.0}
 BuildRequires:  %{python_module testtools >= 2.3.0}
-BuildRequires:  fdupes
-BuildRequires:  python-rpm-macros
+%endif
 # doc requirements
 %if %{with builddocs}
 BuildRequires:  %{python_module Sphinx >= 1.2.1}
 BuildRequires:  %{python_module reno >= 1.8.0}
 %endif
-Requires:       python-GitPython >= 1.0.1
-Requires:       python-PyYAML >= 5.3.1
-Requires:       python-six >= 1.10.0
-Requires:       python-stestr >= 1.0.0
-Requires:       python-stevedore >= 1.20.0
-BuildArch:      noarch
-Requires(post):   update-alternatives
-Requires(postun):  update-alternatives
-
 %python_subpackages
 
 %description
@@ -72,35 +82,36 @@
 %patch0 -p1
 sed -i '/^#!/d' bandit/__main__.py
 
+%if !%{with test}
 %build
 %python_build
+%endif
 
+%if !%{with test}
 %install
 %python_install
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 %python_clone -a %{buildroot}%{_bindir}/bandit
 %python_clone -a %{buildroot}%{_bindir}/bandit-config-generator
 %python_clone -a %{buildroot}%{_bindir}/bandit-baseline
+%endif
 
+%if %{with test}
 %check
-# Copy executables to py2/3 build areas, to be used for testing
-%{python_expand mkdir build/bin
-for filepath in %{buildroot}/%{_bindir}/bandit*-%{$python_bin_suffix}; do
-  filename=$(basename $filepath)
-  unsuffixed=${filename/-%{$python_bin_suffix}/}
-  cp $filepath build/bin/$unsuffixed
-done
-}
-%{python_expand export PATH="$(pwd)/build/bin:$PATH"
-$python setup.py test
-}
+%pyunittest discover -v
+%endif
 
+%if !%{with test}
 %post
 %{python_install_alternative bandit bandit-config-generator bandit-baseline }
+%endif
 
+%if !%{with test}
 %postun
 %python_uninstall_alternative bandit
+%endif
 
+%if !%{with test}
 %files %{python_files}
 %license LICENSE
 %doc AUTHORS ChangeLog README.rst
@@ -108,5 +119,6 @@
 %python_alternative %{_bindir}/bandit-config-generator
 %python_alternative %{_bindir}/bandit-baseline
 %{python_sitelib}/*
+%endif
 
 %changelog

++++++ _multibuild ++++++
<multibuild>
  <package>test</package>
</multibuild>

Reply via email to