15
0
Files
python-autopep8/python-autopep8.spec
Dirk Mueller 1d1f63f22b - update to 2.3.1:
* skip e501 fixed method for f-string line without aggressive
    option
  * Fix argument parser errors are printed without a trailing
    newline
- update to 2.3.0:
  * add handling for E204 whitespace after decorator
  * require to pycodestyle v2.12.0+
- update to 2.2.0:
  * experimental option is deprecated
  * fix specific case of e271 and w504
  * skip e501 fixed method for f-string line(s)
- update to 2.1.2:
  * Fix e501 experimental fstring case in Python3.12+
- update to 2.1.1:
  * force reload pycodestyle module
- update to 2.1.0:
  * migrate to pyproject.toml
  * run with pypy3.10
  * ISSUE_TEMPLATE: use "console" instead of non-existing "shell"
    syntax
  * add 3.12, drop 3.7
  * tox: add python3.12 to test environments
  * async def function formatting
  * pyproject: support py3.12 via new version of pycodestyle
  * add: unit test for e501 with async def
  * Update python versions
- drop python312-skip-tests.patch (upstream)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autopep8?expand=0&rev=68
2024-11-19 10:44:37 +00:00

85 lines
2.6 KiB
RPMSpec

#
# spec file for package python-autopep8
#
# Copyright (c) 2024 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%{?sle15_python_module_pythons}
Name: python-autopep8
Version: 2.3.1
Release: 0
Summary: Automatic generated to pep8 checked code
License: MIT
Group: Development/Languages/Python
URL: https://github.com/hhatto/autopep8
Source: https://files.pythonhosted.org/packages/source/a/autopep8/autopep8-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pycodestyle >= 2.12}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module tomli if %python-base < 3.11}
BuildRequires: %{python_module wheel}
BuildRequires: python-rpm-macros
Requires: python-pycodestyle >= 2.12.0
%if %{python_version_nodots} < 311
Requires: python-tomli
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Autopep8 is automatic generated to pep8 checked code.
This is old style tool, wrapped pep8 via subprocess module.
%prep
%autosetup -p1 -n autopep8-%{version}
sed -i '1s/^#!.*//' autopep8.py # Remove she-bang line
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/autopep8
%check
export LANG="en_US.UTF-8"
%pytest -k 'not test_e701_with_escaped_newline_and_spaces'
%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:
[ -h %{_bindir}/autopep8 ] || rm -f %{_bindir}/autopep8
%post
%python_install_alternative autopep8
%postun
%python_uninstall_alternative autopep8
%files %{python_files}
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/autopep8
%pycache_only %{python_sitelib}/__pycache__/*
%{python_sitelib}/autopep8.py*
%{python_sitelib}/autopep8-%{version}.dist-info
%changelog