forked from pool/python-bandit
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bandit?expand=0&rev=2
This commit is contained in:
committed by
Git OBS Bridge
parent
c3fa988026
commit
a87dbd271e
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-bandit
|
# spec file for package python-bandit
|
||||||
#
|
#
|
||||||
# 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
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -12,7 +12,9 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
# Tests require python-hacking, which isn't compatible with pycodestyle
|
# Tests require python-hacking, which isn't compatible with pycodestyle
|
||||||
@@ -20,33 +22,33 @@
|
|||||||
Name: python-bandit
|
Name: python-bandit
|
||||||
Version: 1.5.1
|
Version: 1.5.1
|
||||||
Release: 0
|
Release: 0
|
||||||
License: Apache-2.0
|
|
||||||
Summary: Security oriented static analyser for Python code
|
Summary: Security oriented static analyser for Python code
|
||||||
Url: https://github.com/PyCQA/bandit
|
License: Apache-2.0
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
|
Url: https://github.com/PyCQA/bandit
|
||||||
Source: https://files.pythonhosted.org/packages/source/b/bandit/bandit-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/b/bandit/bandit-%{version}.tar.gz
|
||||||
Patch0: remove-non-test-deps.patch
|
Patch0: remove-non-test-deps.patch
|
||||||
BuildRequires: %{python_module pbr >= 1.8}
|
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: python-rpm-macros
|
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildRequires: %{python_module GitPython >= 1.0.1}
|
BuildRequires: %{python_module GitPython >= 1.0.1}
|
||||||
BuildRequires: %{python_module PyYAML >= 3.10.0}
|
BuildRequires: %{python_module PyYAML >= 3.10.0}
|
||||||
BuildRequires: %{python_module beautifulsoup4}
|
BuildRequires: %{python_module beautifulsoup4}
|
||||||
BuildRequires: %{python_module fixtures >= 3.0.0}
|
BuildRequires: %{python_module fixtures >= 3.0.0}
|
||||||
BuildRequires: %{python_module mock >= 2.0}
|
BuildRequires: %{python_module mock >= 2.0}
|
||||||
|
BuildRequires: %{python_module pbr >= 1.8}
|
||||||
BuildRequires: %{python_module python-subunit >= 0.0.18}
|
BuildRequires: %{python_module python-subunit >= 0.0.18}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six >= 1.9.0}
|
BuildRequires: %{python_module six >= 1.9.0}
|
||||||
BuildRequires: %{python_module stevedore >= 1.17.1}
|
BuildRequires: %{python_module stevedore >= 1.17.1}
|
||||||
BuildRequires: %{python_module testrepository >= 0.0.18}
|
BuildRequires: %{python_module testrepository >= 0.0.18}
|
||||||
BuildRequires: %{python_module testscenarios >= 0.4}
|
BuildRequires: %{python_module testscenarios >= 0.4}
|
||||||
BuildRequires: %{python_module testtools >= 1.4.0}
|
BuildRequires: %{python_module testtools >= 1.4.0}
|
||||||
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: python-rpm-macros
|
||||||
# doc requirements
|
# doc requirements
|
||||||
%if %{with builddocs}
|
%if %{with builddocs}
|
||||||
BuildRequires: %{python_module reno >= 1.8.0}
|
|
||||||
BuildRequires: %{python_module Sphinx >= 1.2.1}
|
BuildRequires: %{python_module Sphinx >= 1.2.1}
|
||||||
BuildRequires: %{python_module oslotest >= 1.10.0}
|
|
||||||
BuildRequires: %{python_module oslosphinx >= 4.7.0}
|
BuildRequires: %{python_module oslosphinx >= 4.7.0}
|
||||||
|
BuildRequires: %{python_module oslotest >= 1.10.0}
|
||||||
|
BuildRequires: %{python_module reno >= 1.8.0}
|
||||||
%endif
|
%endif
|
||||||
Requires: python-GitPython >= 1.0.1
|
Requires: python-GitPython >= 1.0.1
|
||||||
Requires: python-PyYAML >= 3.10.0
|
Requires: python-PyYAML >= 3.10.0
|
||||||
@@ -78,6 +80,8 @@ sed -i '/^#!/d' bandit/__main__.py
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/bandit
|
%python_clone -a %{buildroot}%{_bindir}/bandit
|
||||||
%python_clone -a %{buildroot}%{_bindir}/bandit-config-generator
|
%python_clone -a %{buildroot}%{_bindir}/bandit-config-generator
|
||||||
%python_clone -a %{buildroot}%{_bindir}/bandit-baseline
|
%python_clone -a %{buildroot}%{_bindir}/bandit-baseline
|
||||||
|
|
||||||
|
%check
|
||||||
# Copy executables to py2/3 build areas, to be used for testing
|
# Copy executables to py2/3 build areas, to be used for testing
|
||||||
%{python_expand mkdir build/bin
|
%{python_expand mkdir build/bin
|
||||||
for filepath in %{buildroot}/%{_bindir}/bandit*-%{$python_bin_suffix}; do
|
for filepath in %{buildroot}/%{_bindir}/bandit*-%{$python_bin_suffix}; do
|
||||||
@@ -86,8 +90,6 @@ for filepath in %{buildroot}/%{_bindir}/bandit*-%{$python_bin_suffix}; do
|
|||||||
cp $filepath build/bin/$unsuffixed
|
cp $filepath build/bin/$unsuffixed
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
%check
|
|
||||||
%{python_expand export PATH="$(pwd)/build/bin:$PATH"
|
%{python_expand export PATH="$(pwd)/build/bin:$PATH"
|
||||||
$python setup.py test
|
$python setup.py test
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user