2019-09-13 09:44:38 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-bowler
|
|
|
|
|
#
|
2025-05-15 15:19:11 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2019-09-13 09:44:38 +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.
|
|
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
2025-06-04 14:54:57 +00:00
|
|
|
%bcond_without libalternatives
|
2019-09-13 09:44:38 +00:00
|
|
|
Name: python-bowler
|
2020-10-13 10:38:31 +00:00
|
|
|
Version: 0.9.0
|
2019-09-13 09:44:38 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Safe code refactoring for modern Python projects
|
|
|
|
|
License: MIT
|
|
|
|
|
Group: Development/Languages/Python
|
|
|
|
|
URL: https://github.com/facebookincubator/bowler
|
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/b/bowler/bowler-%{version}.tar.gz
|
|
|
|
|
BuildRequires: %{python_module attrs}
|
|
|
|
|
BuildRequires: %{python_module base >= 3.6}
|
|
|
|
|
BuildRequires: %{python_module click}
|
|
|
|
|
BuildRequires: %{python_module fissix}
|
2020-10-13 10:38:31 +00:00
|
|
|
BuildRequires: %{python_module moreorless}
|
2025-05-15 15:19:11 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-09-13 09:44:38 +00:00
|
|
|
BuildRequires: %{python_module setuptools >= 38.6.0}
|
2020-10-13 10:38:31 +00:00
|
|
|
BuildRequires: %{python_module volatile}
|
2025-05-15 15:19:11 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2025-06-04 14:54:57 +00:00
|
|
|
BuildRequires: alts
|
2019-09-13 09:44:38 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2025-06-04 14:54:57 +00:00
|
|
|
Requires: alts
|
2019-09-13 09:44:38 +00:00
|
|
|
Requires: python-attrs
|
|
|
|
|
Requires: python-click
|
|
|
|
|
Requires: python-fissix
|
2020-10-13 10:38:31 +00:00
|
|
|
Requires: python-moreorless
|
|
|
|
|
Requires: python-volatile
|
2019-09-13 09:44:38 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Bowler is a refactoring tool for manipulating Python at the syntax tree level. It enables
|
|
|
|
|
safe, large scale code modifications while guaranteeing that the resulting code compiles
|
|
|
|
|
and runs. It provides both a simple command line interface and a fluent API in Python for
|
|
|
|
|
generating complex code modifications in code.
|
|
|
|
|
|
|
|
|
|
Bowler uses a "fluent" `Query` API to build refactoring scripts through a series
|
|
|
|
|
of selectors, filters, and modifiers. Many simple modifications are already possible
|
|
|
|
|
using the existing API, but you can also provide custom selectors, filters, and
|
|
|
|
|
modifiers as needed to build more complex or custom refactorings. See the
|
|
|
|
|
[Query Reference](https://pybowler.io/docs/api-query) for more details.
|
|
|
|
|
|
|
|
|
|
%prep
|
2025-06-04 14:54:57 +00:00
|
|
|
%autosetup -p1 -n bowler-%{version}
|
2019-09-13 09:44:38 +00:00
|
|
|
|
|
|
|
|
%build
|
2025-05-15 15:19:11 +00:00
|
|
|
%pyproject_wheel
|
2019-09-13 09:44:38 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-05-15 15:19:11 +00:00
|
|
|
%pyproject_install
|
2020-05-28 07:30:59 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/bowler
|
2019-09-13 09:44:38 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%python_exec -m bowler.tests
|
|
|
|
|
|
2025-06-04 14:54:57 +00:00
|
|
|
%pre
|
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
|
%python_libalternatives_reset_alternative bowler
|
2020-05-28 07:30:59 +00:00
|
|
|
|
2025-06-04 14:54:57 +00:00
|
|
|
# post and postun macro call is not needed with only libalternatives
|
2020-05-28 07:30:59 +00:00
|
|
|
|
2019-09-13 09:44:38 +00:00
|
|
|
%files %{python_files}
|
|
|
|
|
%doc README.md
|
|
|
|
|
%license LICENSE
|
2025-05-15 15:19:11 +00:00
|
|
|
%{python_sitelib}/bowler
|
|
|
|
|
%{python_sitelib}/bowler-%{version}*-info
|
2020-05-28 07:30:59 +00:00
|
|
|
%python_alternative %{_bindir}/bowler
|
2019-09-13 09:44:38 +00:00
|
|
|
|
|
|
|
|
%changelog
|