File python-coala.spec of Package python-coala
#
# spec file for package python-coala
#
# 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
%define skip_python2 1
Name: python-coala
Version: 0.12.0.dev20180101025653
Release: 0
License: AGPL-3.0
Summary: Linting and Fixing Code for All Languages
Url: http://coala.io/
Group: Development/Languages/Python
Source: https://files.pythonhosted.org/packages/source/c/coala/coala-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module coala_utils >= 0.6.2}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
%if %{with test}
BuildRequires: %{python_module PyPrint >= 0.2.6}
BuildRequires: %{python_module Pygments >= 2.1}
BuildRequires: %{python_module appdirs >= 1.4}
BuildRequires: %{python_module argcomplete >= 1.8}
BuildRequires: %{python_module codecov >= 2.0.5}
BuildRequires: %{python_module colorlog >= 2.7}
BuildRequires: %{python_module coverage >= 4.3.4}
BuildRequires: %{python_module coverage-config-reload-plugin >= 0.2}
BuildRequires: %{python_module coverage-env-plugin >= 0.1}
BuildRequires: %{python_module dependency_management >= 0.4.0}
BuildRequires: %{python_module freezegun >= 0.3.9}
BuildRequires: %{python_module libclang-py3 >= 3.4.0}
BuildRequires: %{python_module packaging >= 16.8}
BuildRequires: %{python_module pip >= 9.0.0}
BuildRequires: %{python_module pytest >= 3.1.1}
BuildRequires: %{python_module pytest-cov >= 2.2}
BuildRequires: %{python_module pytest-env >= 0.6.0}
BuildRequires: %{python_module pytest-error-for-skips >= 1.0}
BuildRequires: %{python_module pytest-instafail >= 0.3.0}
BuildRequires: %{python_module pytest-mock >= 1.1}
BuildRequires: %{python_module pytest-reorder >= 0.1.0}
BuildRequires: %{python_module pytest-reqs >= 0.0.6}
BuildRequires: %{python_module pytest-timeout >= 1.0}
BuildRequires: %{python_module pytest-xdist >= 1.14}
BuildRequires: %{python_module requests >= 2.12}
BuildRequires: %{python_module requests-mock >= 1.2}
BuildRequires: %{python_module setuptools >= 17.0}
BuildRequires: %{python_module testfixtures >= 4.14.3}
BuildRequires: %{python_module unidiff >= 0.5.2}
BuildRequires: %{python_module wheel >= 0.29}
%endif
Requires: python-appdirs >= 1.4
Requires: python-coala_utils >= 0.6.2
Requires: python-colorlog >= 2.7
Requires: python-dependency_management >= 0.4.0
Requires: python-libclang-py3 >= 3.4.0
Requires: python-packaging >= 16.8
Requires: python-Pygments >= 2.1
Requires: python-PyPrint >= 0.2.6
Requires: python-requests >= 2.12
Requires: python-setuptools >= 17.0
Requires: python-testfixtures >= 4.14.3
Requires: python-unidiff >= 0.5.2
BuildArch: noarch
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
Coala provides a unified interface for linting and fixing code with a
single configuration file, regardless of the programming languages
used. You can use coala from within your favorite editor, integrate it
with your CI, get the results as JSON, or customize it to your needs
with its flexible configuration syntax.
Coala supports popular programming languages including Python, C/C++,
Java, JavaScript, CSS, and several others out of the box.
%prep
%setup -q -n coala-%{version}
%build
%python_build
%install
%python_install
mkdir -p %{buildroot}%{_mandir}/man1
mv %{buildroot}%{_prefix}/coala.1 %{buildroot}%{_mandir}/man1/
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/coala
%python_clone -a %{buildroot}%{_bindir}/coala-ci
%python_clone -a %{buildroot}%{_bindir}/coala-json
%python_clone -a %{buildroot}%{_bindir}/coala-format
%python_clone -a %{buildroot}%{_bindir}/coala-delete-orig
%python_clone -a %{buildroot}%{_mandir}/man1/coala.1
%if %{with test}
%check
%python_expand py.test-%{$python_bin_suffix}
%endif
%post
%{python_install_alternative coala coala-ci coala-json coala-format coala-delete-orig}
%postun
%python_uninstall_alternative coala
%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%python_alternative %{_bindir}/coala
%python_alternative %{_bindir}/coala-ci
%python_alternative %{_bindir}/coala-json
%python_alternative %{_bindir}/coala-format
%python_alternative %{_bindir}/coala-delete-orig
%python_alternative %{_mandir}/man1/coala.1%{ext_man}
%{python_sitelib}/*
%changelog