14
0
forked from pool/python-black

Accepting request 809567 from home:pgajdos:python

submit

OBS-URL: https://build.opensuse.org/request/show/809567
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-black?expand=0&rev=17
This commit is contained in:
Tomáš Chvátal
2020-05-28 07:31:55 +00:00
committed by Git OBS Bridge
parent 7b5ee76e28
commit 42f8edd925
2 changed files with 17 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed May 27 09:36:28 UTC 2020 - Petr Gajdos <pgajdos@suse.com>
- %python3_only -> %python_alternative
-------------------------------------------------------------------
Wed Nov 13 11:25:32 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-black
#
# Copyright (c) 2019 SUSE LLC.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -56,6 +56,8 @@ Requires: python-regex
Requires: python-toml >= 0.9.4
Requires: python-typed-ast
Requires: python-typing_extensions
Requires(post): update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@@ -80,6 +82,7 @@ rm -rf %{pypi_name}.egg-info
%install
%python_install
%python_clone -a %{buildroot}%{_bindir}/black
%python_expand %fdupes %{buildroot}%{$python_sitelib}
# TODO: missing aiohttp-cors (not in distribution and tests failing)
rm %{buildroot}/%{_bindir}/blackd
@@ -88,10 +91,16 @@ rm %{buildroot}/%{_bindir}/blackd
# test_expression_diff - sometimes fails on async timing in OBS
%pytest -k 'not test_expression_diff'
%post
%python_install_alternative black
%postun
%python_uninstall_alternative black
%files %{python_files}
%doc README.md
%python3_only %{_bindir}/black
#%%python3_only %%{_bindir}/blackd
%python_alternative %{_bindir}/black
#%%python_alternative %%{_bindir}/blackd
%license LICENSE
%{python_sitelib}/*