14
0
forked from pool/python-libcst

- Add skip_failing_test.patch skipping test_ordering

(libcst.metadata.tests.test_scope_provider.ScopeProviderTest) which
  doesn't work with Python 3.6 on i586 (gh#Instagram/LibCST#442).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=9
This commit is contained in:
2021-01-03 16:40:17 +00:00
committed by Git OBS Bridge
parent ec3880cbff
commit 38688d5028
3 changed files with 55 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-libcst
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -33,6 +33,9 @@ Summary: Python 3.5+ concrete syntax tree with AST-like properties
License: MIT
URL: https://github.com/Instagram/LibCST
Source: https://files.pythonhosted.org/packages/source/l/libcst/libcst-%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip_failing_test.patch gh#Instagram/LibCST#442 mcepl@suse.com
# test fails on i586 with Python 3.6
Patch0: skip_failing_test.patch
# isort needed for the code regeneration, code mod also on non test flavor
BuildRequires: %{python_module isort >= 5.5.3}
BuildRequires: %{python_module setuptools}
@@ -47,14 +50,14 @@ Requires: python-dataclasses
%endif
%if %{with test}
BuildRequires: %{python_module PyYAML >= 5.2}
BuildRequires: (python3-dataclasses if python3-base < 3.7)
BuildRequires: (python36-dataclasses if python36-base)
# black needed for tests and the code regeneration
BuildRequires: %{python_module black}
BuildRequires: %{python_module hypothesis >= 4.36.0}
BuildRequires: %{python_module hypothesmith >= 0.0.4}
BuildRequires: %{python_module typing-inspect >= 0.4.0}
BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
BuildRequires: (python3-dataclasses if python3-base < 3.7)
BuildRequires: (python36-dataclasses if python36-base)
%endif
%python_subpackages
@@ -63,6 +66,8 @@ A concrete syntax tree with AST-like properties for Python 3.5+ programs.
%prep
%setup -q -n libcst-%{version}
%autopatch -p1
# fix executable
sed -i 's/"python"/sys.executable/' libcst/codemod/tests/test_codemod_cli.py