forked from pool/python-pylama
Accepting request 605970 from devel:languages:python:misc
Python code quality checkecer OBS-URL: https://build.opensuse.org/request/show/605970 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylama?expand=0&rev=1
This commit is contained in:
99
python-pylama.spec
Normal file
99
python-pylama.spec
Normal file
@@ -0,0 +1,99 @@
|
||||
#
|
||||
# spec file for package python-pylama
|
||||
#
|
||||
# Copyright (c) 2018 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%bcond_with test
|
||||
Name: python-pylama
|
||||
Version: 7.4.3
|
||||
Release: 0
|
||||
Summary: Code audit tool for python
|
||||
License: LGPL-3.0
|
||||
Group: Development/Languages/Python
|
||||
Url: https://github.com/klen/pylama
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pylama/pylama-%{version}.tar.gz
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module mccabe >= 0.5.2}
|
||||
BuildRequires: %{python_module pycodestyle >= 2.3.1}
|
||||
BuildRequires: %{python_module pydocstyle >= 2.0.0}
|
||||
BuildRequires: %{python_module pyflakes >= 1.5.0}
|
||||
BuildRequires: %{python_module py}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module radon}
|
||||
BuildRequires: python-configparser
|
||||
%endif
|
||||
Requires: python-py
|
||||
Recommends: python-mccabe >= 0.5.2
|
||||
Recommends: python-pycodestyle >= 2.3.1
|
||||
Recommends: python-pydocstyle >= 2.0.0
|
||||
Recommends: python-pyflakes >= 1.5.0
|
||||
Recommends: python-radon
|
||||
%ifpython2
|
||||
Requires: python-configparser
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Code audit tool for Python and JavaScript. Pylama wraps these tools:
|
||||
|
||||
* PEP8_ © 2012-2013, Florent Xicluna;
|
||||
* PEP257_ © 2012, GreenSteam, <http://greensteam.dk/>
|
||||
* PyFlakes_ © 2005-2013, Kevin Watters;
|
||||
* Mccabe_ © Ned Batchelder;
|
||||
|
||||
%prep
|
||||
%setup -q -n pylama-%{version}
|
||||
|
||||
%build
|
||||
export LANG=en_US.UTF-8
|
||||
%python_build
|
||||
|
||||
%install
|
||||
export LANG=en_US.UTF-8
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/pylama
|
||||
|
||||
%if %{with test}
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
%python_expand py.test-%{$python_bin_suffix} pylama/pytest.py
|
||||
%endif
|
||||
|
||||
%post
|
||||
%python_install_alternative pylama
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative pylama
|
||||
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS Changelog README.rst
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/pylama
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user