forked from pool/python-black
Accepting request 747363 from devel:languages:python
- update to 19.10b0 - add fix-tests.patch to avoid problem during test collection - dont distribute 'blackd' as missing deps * no obvious changelog OBS-URL: https://build.opensuse.org/request/show/747363 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-black?expand=0&rev=5
This commit is contained in:
3
black-19.10b0.tar.gz
Normal file
3
black-19.10b0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539
|
||||
size 1019740
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:68950ffd4d9169716bcb8719a56c07a2f4485354fec061cdd5910aa07369731c
|
||||
size 155556
|
||||
18
fix-tests.patch
Normal file
18
fix-tests.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
Index: black-19.10b0/tests/test_black.py
|
||||
===================================================================
|
||||
--- black-19.10b0.orig/tests/test_black.py
|
||||
+++ black-19.10b0/tests/test_black.py
|
||||
@@ -20,10 +20,11 @@ from click.testing import CliRunner
|
||||
import black
|
||||
from black import Feature, TargetVersion
|
||||
|
||||
+from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
|
||||
+from aiohttp import web
|
||||
+
|
||||
try:
|
||||
import blackd
|
||||
- from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop
|
||||
- from aiohttp import web
|
||||
except ImportError:
|
||||
has_blackd_deps = False
|
||||
else:
|
||||
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 11 14:14:38 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- update to 19.10b0
|
||||
- add fix-tests.patch to avoid problem during test collection
|
||||
- dont distribute 'blackd' as missing deps
|
||||
* no obvious changelog
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 4 13:53:31 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
||||
@@ -19,28 +19,42 @@
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-black
|
||||
Version: 19.3b0
|
||||
Version: 19.10b0
|
||||
Release: 0
|
||||
Summary: A code formatter written in, and written for Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/ambv/black
|
||||
Source: https://files.pythonhosted.org/packages/source/b/black/black-%{version}.tar.gz
|
||||
Patch0: fix-tests.patch
|
||||
BuildRequires: %{python_module aiohttp >= 3.3.2}
|
||||
# TODO: needed for blackf
|
||||
#BuildRequires: %{python_module aiohttp-cors}
|
||||
BuildRequires: %{python_module appdirs}
|
||||
BuildRequires: %{python_module attrs >= 18.1.0}
|
||||
BuildRequires: %{python_module base >= 3.6}
|
||||
BuildRequires: %{python_module click >= 6.5}
|
||||
BuildRequires: %{python_module mypy_extensions}
|
||||
BuildRequires: %{python_module pathspec}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module regex}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module toml >= 0.9.4}
|
||||
BuildRequires: %{python_module typed-ast}
|
||||
BuildRequires: %{python_module typing_extensions}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-aiohttp >= 3.3.2
|
||||
# TODO: needed for blackd
|
||||
#Requires: python-aiohttp-cors
|
||||
Requires: python-appdirs
|
||||
Requires: python-attrs >= 18.1.0
|
||||
Requires: python-click >= 6.5
|
||||
Requires: python-mypy_extensions
|
||||
Requires: python-regex
|
||||
Requires: python-toml >= 0.9.4
|
||||
Requires: python-typed-ast
|
||||
Requires: python-typing_extensions
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -57,6 +71,7 @@ also recognizes YAPF's block comments to the same effect.
|
||||
|
||||
%prep
|
||||
%setup -q -n black-%{version}
|
||||
%patch0 -p1
|
||||
rm -rf %{pypi_name}.egg-info
|
||||
|
||||
%build
|
||||
@@ -65,6 +80,8 @@ rm -rf %{pypi_name}.egg-info
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
# TODO: missing aiohttp-cors (not in distribution and tests failing)
|
||||
rm %{buildroot}/%{_bindir}/blackd
|
||||
|
||||
%check
|
||||
# test_expression_diff - sometimes fails on async timing in OBS
|
||||
@@ -73,7 +90,7 @@ rm -rf %{pypi_name}.egg-info
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%python3_only %{_bindir}/black
|
||||
%python3_only %{_bindir}/blackd
|
||||
#%%python3_only %%{_bindir}/blackd
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user