2018-05-09 23:45:01 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pylama
|
|
|
|
#
|
2019-02-18 11:03:15 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2018-05-09 23:45:01 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-12-04 13:52:03 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-05-09 23:45:01 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pylama
|
2019-05-08 10:11:40 +00:00
|
|
|
Version: 7.7.1
|
2018-05-09 23:45:01 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Code audit tool for python
|
2018-12-04 13:52:03 +00:00
|
|
|
License: LGPL-3.0-only
|
2018-05-09 23:45:01 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-02-18 11:03:15 +00:00
|
|
|
URL: https://github.com/klen/pylama
|
2018-05-09 23:45:01 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pylama/pylama-%{version}.tar.gz
|
2019-05-08 10:11:40 +00:00
|
|
|
# https://github.com/klen/pylama/issues/147
|
2019-02-18 11:03:15 +00:00
|
|
|
Source1: https://raw.githubusercontent.com/klen/pylama/develop/dummy.py
|
|
|
|
BuildRequires: %{python_module eradicate >= 0.2}
|
2018-05-09 23:45:01 +00:00
|
|
|
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}
|
2019-02-18 11:03:15 +00:00
|
|
|
BuildRequires: %{python_module pylint}
|
2018-05-09 23:45:01 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-02-18 11:03:15 +00:00
|
|
|
BuildRequires: %{python_module radon >= 1.4.2}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: git-core
|
2019-05-08 10:11:40 +00:00
|
|
|
BuildRequires: mypy
|
2019-02-18 11:03:15 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-setuptools
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2018-05-09 23:45:01 +00:00
|
|
|
Recommends: python-mccabe >= 0.5.2
|
|
|
|
Recommends: python-pycodestyle >= 2.3.1
|
|
|
|
Recommends: python-pydocstyle >= 2.0.0
|
|
|
|
Recommends: python-pyflakes >= 1.5.0
|
2019-02-18 11:03:15 +00:00
|
|
|
Recommends: python-pylint
|
|
|
|
Recommends: python-radon >= 1.4.2
|
2018-05-09 23:45:01 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-02-18 11:03:15 +00:00
|
|
|
Audit tool for Python and JavaScript. Pylama wraps these tools:
|
|
|
|
* PEP8
|
|
|
|
* PEP257
|
|
|
|
* PyFlakes
|
|
|
|
* Mccabe
|
2018-05-09 23:45:01 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n pylama-%{version}
|
2019-02-18 11:03:15 +00:00
|
|
|
cp %{SOURCE1} .
|
2018-05-09 23:45:01 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
export LANG=en_US.UTF-8
|
|
|
|
%python_install
|
2019-02-18 11:03:15 +00:00
|
|
|
%python_expand rm -rf %{buildroot}%{$python_sitelib}/tests
|
2018-05-09 23:45:01 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pylama
|
|
|
|
|
|
|
|
%check
|
|
|
|
export LANG=en_US.UTF-8
|
2019-02-18 11:03:15 +00:00
|
|
|
%python_expand py.test-%{$python_bin_suffix} -v tests/
|
2018-05-09 23:45:01 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative pylama
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pylama
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc AUTHORS Changelog README.rst
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/pylama
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|