15
0

- switch to modern python on sle15

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-autoflake?expand=0&rev=27
This commit is contained in:
2024-08-14 14:49:03 +00:00
committed by Git OBS Bridge
commit 00ae07e6f5
6 changed files with 269 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
autoflake-2.2.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:62b7b6449a692c3c9b0c916919bbc21648da7281e8506bcf8d3f8280e431ebc1
size 27377

136
python-autoflake.changes Normal file
View File

@@ -0,0 +1,136 @@
-------------------------------------------------------------------
Wed Aug 14 14:48:53 UTC 2024 - Dirk Müller <dmueller@suse.com>
- switch to modern python on sle15
-------------------------------------------------------------------
Tue Feb 6 18:28:40 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>
- Add upstream support-python312.patch gh#PyCQA/autoflake#280
-------------------------------------------------------------------
Thu Dec 14 09:15:04 UTC 2023 - Petr Gajdos <pgajdos@suse.com>
- update to 2.2.1:
* Add type annotations and validate with pyright
* Remove test_fuzz_pypi
* Revert "Support .toml configuration format with --config flag
* Support .toml configuration format with --config flag
* Fix a typo in a link to pre-commit
* Update standard_paths so it only checks existing directories
* Upgrade minimum version of pyflakes
* Add upper limit to pyflake's version <3.0 to support handling
of python 2.x
* fix: Ignore pass multiple lines after docstring with flag
* Fixed multiprocessing issue on win64 with more than 60 cores
* Fix default value for `--imports`
* Use regular dictionary instead of defaultdict
* Properly consider options from config file and flags
* Update merge_configuration_file to prefer values from flags
* Unified output to stdout when using --check
* add config-file option
* Fix Namespace check
* Add --check-diff flag which combines check and diff
* Use black for formatting code
* Migrate to tomli
* PEP 621: Migrate to pyproject.toml
* Add option to keep pass statements
-------------------------------------------------------------------
Mon Jul 31 18:49:08 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Remove upstreamed patch rm_assert_failing_310.patch.
-------------------------------------------------------------------
Mon Sep 12 08:00:46 UTC 2022 - Dirk Müller <dmueller@suse.com>
- reenable build for python38, issue got fixed in current release
-------------------------------------------------------------------
Fri Sep 9 16:07:50 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
- Update to v1.5.3
* test_autoflake: use os.linesep in assertion
* Make sure messages use os.linesep
* test_autoflake: add a test for #129
* autoflake: propagate the exit status instead of calling sys.exit
* Renamed the head branch
* Remove Makefile and reference to travis.yml
- Update to v1.5.2
* Remove usage of deprecated distutils module
* Also add support for removing RHS of unused variables.
* Use the new sysconfig module instead of distutils
* added option to remove RHS also when removing unused variables (#92)
-------------------------------------------------------------------
Sun Aug 28 10:41:19 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to v1.5.1
* support for reading configuration from setup.cfg and
pyproject.toml
* new flag `--quiet`
* drop support for old versions of Python (<3.7)
* support for reading contents from stdin (prints the output to
stdout, ideal for integration with editors)
* support for parallel execution with `--jobs`
- Skip building Python 3.8: gh#PyCQA/autoflake#100
-------------------------------------------------------------------
Wed Feb 23 14:04:15 UTC 2022 - Matej Cepl <mcepl@suse.com>
- Skip failing test for Python 3.10 (gh#PyCQA/autoflake#104)
-------------------------------------------------------------------
Mon Aug 31 04:16:47 UTC 2020 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.4:
* No upstream changelog
- Switch from setup.py test to pytest
-------------------------------------------------------------------
Fri Sep 13 11:32:10 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 1.3.1:
* no upstream changelog
-------------------------------------------------------------------
Thu May 16 17:27:05 UTC 2019 - Meera Belur <mbelur@suse.com>
- Update to v1.3
+ No changes were provided
-------------------------------------------------------------------
Sun Feb 10 13:50:19 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Update to v1.2
+ Have `standard_paths` look in both platform-specific and
platform-independent directories
(replaces fix_standard_paths.patch)
+ Add LICENSE
+ Drop Python 3.3
- Remove unnecessary build dependency %pythons
- Remove unused build dependency 'coverage'
-------------------------------------------------------------------
Wed Dec 5 01:54:31 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Use noun phrase in summary.
-------------------------------------------------------------------
Tue Dec 4 12:45:50 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Wed May 9 18:33:29 UTC 2018 - toddrme2178@gmail.com
- Add license file
- Use license tag
-------------------------------------------------------------------
Fri Oct 20 16:13:14 UTC 2017 - toddrme2178@gmail.com
- initial version
- Add fix_standard_paths.patch
* Fix for https://github.com/myint/autoflake/issues/32

86
python-autoflake.spec Normal file
View File

@@ -0,0 +1,86 @@
#
# spec file for package python-autoflake
#
# 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-autoflake
Version: 2.2.1
Release: 0
Summary: Program to removes unused Python imports and variables
License: MIT
URL: https://github.com/myint/autoflake
Source: https://files.pythonhosted.org/packages/source/a/autoflake/autoflake-%{version}.tar.gz
# PATCH-FIX-UPSTREAM support-python312.patch gh#PyCQA/autoflake#280
Patch1: support-python312.patch
Requires: python-tomli
BuildRequires: %{python_module base >= 3.7}
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyflakes >= 3.0.0}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-pyflakes >= 3.0.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
Autoflake removes unused imports and unused variables from Python
code. It makes use of pyflakes to do this.
By default, autoflake only removes unused imports for modules that
are part of the standard library. (Other modules may have side
effects that make them unsafe to remove automatically.) Removal of
unused variables is also disabled by default.
autoflake also removes useless pass statements.
%prep
%autosetup -p1 -n autoflake-%{version}
sed -i '1{/env python/d}' autoflake.py
chmod -x autoflake.py
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand rm %{buildroot}%{$python_sitelib}/{LICENSE,README.md,test*.py,__pycache__/test*.pyc}
%python_clone -a %{buildroot}%{_bindir}/autoflake
%fdupes %{buildroot}%{$python_sitelib}
%check
export LANG=en_US.UTF-8
%pyunittest -v test_autoflake
%post
%python_install_alternative autoflake
%postun
%python_uninstall_alternative autoflake
%files %{python_files}
%doc AUTHORS.rst README.md
%license LICENSE
%python_alternative %{_bindir}/autoflake
%{python_sitelib}/autoflake.py*
%pycache_only %{python_sitelib}/__pycache__/autoflake*.pyc
%{python_sitelib}/autoflake-%{version}*-info
%changelog

20
support-python312.patch Normal file
View File

@@ -0,0 +1,20 @@
Index: autoflake-2.2.1/test_autoflake.py
===================================================================
--- autoflake-2.2.1.orig/test_autoflake.py
+++ autoflake-2.2.1/test_autoflake.py
@@ -928,6 +928,7 @@ StrictVersion('1.0.0')
from distutils.version import LooseVersion, StrictVersion
StrictVersion('1.0.0')
""",
+ remove_all_unused_imports=True,
),
)
@@ -941,6 +942,7 @@ version('1.0.0')
from distutils.version import LooseVersion, StrictVersion as version
version('1.0.0')
""",
+ remove_all_unused_imports=True,
),
)