2011-07-08 14:20:20 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-autopep8
|
|
|
|
|
#
|
2021-04-06 09:07:41 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2011-07-08 14:20:20 +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.
|
2013-10-24 10:59:03 +00:00
|
|
|
|
2018-10-17 16:16:05 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-07-08 14:20:20 +00:00
|
|
|
#
|
|
|
|
|
|
2013-10-24 10:59:03 +00:00
|
|
|
|
2017-08-04 15:23:40 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2013-11-05 16:23:44 +00:00
|
|
|
Name: python-autopep8
|
2021-05-11 21:17:46 +00:00
|
|
|
Version: 1.5.7
|
2011-07-08 14:20:20 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Automatic generated to pep8 checked code
|
2013-10-24 10:59:03 +00:00
|
|
|
License: MIT
|
2011-07-08 14:20:20 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-09-03 09:01:56 +00:00
|
|
|
URL: https://github.com/hhatto/autopep8
|
2017-08-04 15:23:40 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/a/autopep8/autopep8-%{version}.tar.gz
|
2021-04-06 09:07:41 +00:00
|
|
|
BuildRequires: %{python_module pycodestyle >= 2.7}
|
2017-08-04 15:23:40 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2020-06-09 07:41:19 +00:00
|
|
|
BuildRequires: %{python_module toml}
|
2017-08-04 15:23:40 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-04-06 09:07:41 +00:00
|
|
|
Requires: python-pycodestyle >= 2.7
|
2017-08-04 15:23:40 +00:00
|
|
|
Requires: python-setuptools
|
2020-06-09 07:41:19 +00:00
|
|
|
Requires: python-toml
|
2013-11-05 16:23:44 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-04-06 09:07:41 +00:00
|
|
|
Requires(postun):update-alternatives
|
2011-07-08 14:20:20 +00:00
|
|
|
BuildArch: noarch
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_subpackages
|
2011-07-08 14:20:20 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Autopep8 is automatic generated to pep8 checked code.
|
2011-07-20 17:45:53 +00:00
|
|
|
This is old style tool, wrapped pep8 via subprocess module.
|
2011-07-08 14:20:20 +00:00
|
|
|
|
|
|
|
|
%prep
|
2013-11-05 16:23:44 +00:00
|
|
|
%setup -q -n autopep8-%{version}
|
2017-08-04 15:23:40 +00:00
|
|
|
sed -i '1s/^#!.*//' autopep8.py # Remove she-bang line
|
2011-07-08 14:20:20 +00:00
|
|
|
|
|
|
|
|
%build
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_build
|
2011-07-08 14:20:20 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_install
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/autopep8
|
2013-11-05 16:23:44 +00:00
|
|
|
|
|
|
|
|
%check
|
2014-05-12 11:09:11 +00:00
|
|
|
export LANG="en_US.UTF-8"
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_exec setup.py test -q
|
2013-11-05 16:23:44 +00:00
|
|
|
|
|
|
|
|
%pre
|
|
|
|
|
# Since /usr/bin/autopep8 became ghosted to be used with update-alternatives, we have to get rid
|
|
|
|
|
# of the old binary resulting from the non-update-alternativies-ified package:
|
2014-11-14 15:30:08 +00:00
|
|
|
[ -h %{_bindir}/autopep8 ] || rm -f %{_bindir}/autopep8
|
2013-11-05 16:23:44 +00:00
|
|
|
|
|
|
|
|
%post
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_install_alternative autopep8
|
2013-11-05 16:23:44 +00:00
|
|
|
|
2017-08-04 15:23:40 +00:00
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative autopep8
|
2011-07-08 14:20:20 +00:00
|
|
|
|
2017-08-04 15:23:40 +00:00
|
|
|
%files %{python_files}
|
2018-09-03 09:04:03 +00:00
|
|
|
%license LICENSE
|
2011-07-08 14:20:20 +00:00
|
|
|
%doc README.rst
|
2017-08-04 15:23:40 +00:00
|
|
|
%python_alternative %{_bindir}/autopep8
|
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/*
|
2013-11-05 16:23:44 +00:00
|
|
|
%{python_sitelib}/autopep8.py*
|
2017-08-04 15:23:40 +00:00
|
|
|
%{python_sitelib}/autopep8-%{version}-py%{python_version}.egg-info
|
2011-07-08 14:20:20 +00:00
|
|
|
|
|
|
|
|
%changelog
|