Compare commits

6 Commits

Author SHA256 Message Date
ff95867f07 Accepting request 1286291 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1286291
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blue?expand=0&rev=14
2025-06-17 16:23:25 +00:00
fe9f717c8c - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blue?expand=0&rev=32
2025-06-17 08:08:42 +00:00
3357e87b6a Accepting request 1283508 from devel:languages:python
- Switch to pyproject macros.
- Simplify docs build.

OBS-URL: https://build.opensuse.org/request/show/1283508
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blue?expand=0&rev=13
2025-06-06 20:43:38 +00:00
07f8e2ab7d - Switch to pyproject macros.
- Simplify docs build.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blue?expand=0&rev=30
2025-06-06 05:40:09 +00:00
dbb39b6688 Accepting request 1251874 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1251874
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-blue?expand=0&rev=12
2025-03-11 19:44:50 +00:00
000a4e75ee Accepting request 1251802 from home:mcalabkova:branches:devel:languages:python
- Add black-25.1.patch to support changes in black 25.1

OBS-URL: https://build.opensuse.org/request/show/1251802
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blue?expand=0&rev=28
2025-03-10 20:02:18 +00:00
3 changed files with 48 additions and 17 deletions

13
black-25.1.patch Normal file
View File

@@ -0,0 +1,13 @@
Index: blue-0.9.1/blue/__init__.py
===================================================================
--- blue-0.9.1.orig/blue/__init__.py
+++ blue-0.9.1/blue/__init__.py
@@ -102,7 +102,7 @@ from click.decorators import version_opt
LOG = logging.getLogger(__name__)
black_format_file_in_place = black.format_file_in_place
-black_strings_fix_docstring = black.strings.fix_docstring
+black_strings_fix_docstring = black.strings.fix_multiline_docstring
black_strings_normalize_string_quotes = black.strings.normalize_string_quotes
# Try not to poison Black's cache directory.

View File

@@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Jun 17 08:07:46 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Fri Jun 6 05:32:39 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyproject macros.
- Simplify docs build.
-------------------------------------------------------------------
Mon Mar 10 12:59:10 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Add black-25.1.patch to support changes in black 25.1
-------------------------------------------------------------------
Tue Feb 6 19:04:16 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-blue
#
# Copyright (c) 2024 SUSE LLC
# 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
@@ -16,7 +16,7 @@
#
%define skip_python2 1
%bcond_without libalternatives
Name: python-blue
Version: 0.9.1
Release: 0
@@ -30,21 +30,25 @@ Patch1: unpin-tomli.patch
Patch2: flake8-v6-compatibility.patch
# PATCH-FIX-OPENSUSE black-24.1.patch -- gh#grantjenks/blue#97
Patch3: black-24.1.patch
# PATCH-FIX-OPENSUSE black-25.1.patch -- gh#grantjenks/blue#106
Patch4: black-25.1.patch
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module base >= 3.6}
BuildRequires: %{python_module black >= 21.7}
BuildRequires: %{python_module flake8 >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
Requires: python-black >= 24.1
BuildArch: noarch
# SECTION doc and test requirements
BuildRequires: %{python_module Sphinx}
BuildRequires: %{python_module pytest}
# /SECTION
Requires: python-black >= 24.1
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
%description
@@ -59,11 +63,11 @@ start and end with "# fmt: off" and "# fmt: on", respectively. It
also recognizes YAPF's block comments to the same effect.
%package -n python-blue-doc
Summary: Documentation files for %name
Summary: Documentation files for %{name}
Provides: %{python_module foo-doc = %{version}}
%description -n python-blue-doc
HTML Documentation and examples for %name.
HTML Documentation and examples for %{name}.
%prep
%autosetup -p1 -n blue-%{version}
@@ -72,29 +76,27 @@ HTML Documentation and examples for %name.
sed -i '/--cov/d' tox.ini
%build
%python_build
( cd docs ; PYTHONPATH=../build/lib make html )
%pyproject_wheel
%make_build -C docs html
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/blue
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
# gh#grantjenks/blue#72
%pytest -k 'not (test_good_dirs or test_bad_dirs)'
%post
%python_install_alternative blue
%postun
%python_uninstall_alternative blue
%pre
%python_libalternatives_reset_alternative blue
%files %{python_files}
%doc README.rst
%license LICENSE
%python_alternative %{_bindir}/blue
%{python_sitelib}/blue
%{python_sitelib}/blue-%{version}*-info
%{python_sitelib}/blue-%{version}.dist-info
%files -n python-blue-doc
%doc docs/_build/html