From 55ad44de27e5b417842b31ed799fba91af379542588230594b31072ee4f137cd Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Wed, 4 Jun 2025 14:54:57 +0000 Subject: [PATCH] - fix usage of libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-bowler?expand=0&rev=13 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + bowler-0.9.0.tar.gz | 3 ++ python-bowler.changes | 37 ++++++++++++++++++ python-bowler.spec | 88 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 152 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 bowler-0.9.0.tar.gz create mode 100644 python-bowler.changes create mode 100644 python-bowler.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/bowler-0.9.0.tar.gz b/bowler-0.9.0.tar.gz new file mode 100644 index 0000000..631ef45 --- /dev/null +++ b/bowler-0.9.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cdb85ce2e7bd545802a15d755d1daf2b6a125429355c50d2019a9f35d63e45db +size 42594 diff --git a/python-bowler.changes b/python-bowler.changes new file mode 100644 index 0000000..d89dfdd --- /dev/null +++ b/python-bowler.changes @@ -0,0 +1,37 @@ +------------------------------------------------------------------- +Wed Jun 4 14:54:26 UTC 2025 - Nico Krapp + +- fix usage of libalternatives + +------------------------------------------------------------------- +Thu May 15 12:11:44 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Sun Oct 11 07:34:01 UTC 2020 - John Vandenberg + +- Update to v0.9.0 + * Added bowler test command for testing codemod scripts + * Added python_version option to load files with Python 2 print statement + * Implemented Query.encapsulate() to generate @property wrappers + * Improvements to Query.add_argument() and positional arguments + * No longer depends on shelling-out to patch command for applying diffs + * Fix Query.write() to be non-interactive and silent + * Fix unexpected error code after successful queries + * Marked package as typed for PEP 561 support + +------------------------------------------------------------------- +Wed May 27 09:36:30 UTC 2020 - Petr Gajdos + +- %python3_only -> %python_alternative + +------------------------------------------------------------------- +Mon Sep 16 07:12:52 UTC 2019 - Tomáš Chvátal + +- Drop extra license file, it is already present in the tarball + +------------------------------------------------------------------- +Fri Sep 13 09:37:01 UTC 2019 - Tomáš Chvátal + +- initial commit, needed by dephell diff --git a/python-bowler.spec b/python-bowler.spec new file mode 100644 index 0000000..3eb7858 --- /dev/null +++ b/python-bowler.spec @@ -0,0 +1,88 @@ +# +# spec file for package python-bowler +# +# Copyright (c) 2025 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/ +# + + +%bcond_without libalternatives +Name: python-bowler +Version: 0.9.0 +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} +BuildRequires: %{python_module moreorless} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools >= 38.6.0} +BuildRequires: %{python_module volatile} +BuildRequires: %{python_module wheel} +BuildRequires: alts +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: alts +Requires: python-attrs +Requires: python-click +Requires: python-fissix +Requires: python-moreorless +Requires: python-volatile +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 +%autosetup -p1 -n bowler-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/bowler +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec -m bowler.tests + +%pre +# If libalternatives is used: Removing old update-alternatives entries. +%python_libalternatives_reset_alternative bowler + +# post and postun macro call is not needed with only libalternatives + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/bowler +%{python_sitelib}/bowler-%{version}*-info +%python_alternative %{_bindir}/bowler + +%changelog