File python-pep8.spec of Package python-pep8

# spec file for package python-pep8
# Copyright (c) 2017 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-pep8
Version:        1.7.0
Release:        0
Summary:        Python style guide checker
License:        MIT
Group:          Development/Languages/Python
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
Requires:       python-setuptools
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

Pep8 is a tool to check your Python code against some of the style
conventions in PEP 8.

%setup -q -n pep8-%{version}
sed -ri '1s/^#!.*//'


%python_clone -a %{buildroot}%{_bindir}/pep8

%fdupes %{buildroot}%{_prefix}

%python_exec test

%python_install_alternative pep8

%python_uninstall_alternative pep8

%files %{python_files}
%doc CHANGES.txt README.rst
%python_alternative %{_bindir}/pep8
%pycache_only %{python_sitelib}/__pycache__/*

openSUSE Build Service is sponsored by