forked from pool/python-libcst
Accepting request 1082129 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1082129 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-libcst?expand=0&rev=8
This commit is contained in:
@@ -1,3 +1,18 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 21 12:27:55 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add sle15_python_module_pythons (jsc#PED-68)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 19 02:01:37 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Refresh replace-python-call.patch to make tests working.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 13 22:42:28 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Make calling of %{sle15modernpython} optional.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Dec 14 11:41:04 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
Wed Dec 14 11:41:04 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -27,6 +27,7 @@
|
|||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%define modname libcst
|
%define modname libcst
|
||||||
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-libcst%{psuffix}
|
Name: python-libcst%{psuffix}
|
||||||
Version: 0.4.9
|
Version: 0.4.9
|
||||||
Release: 0
|
Release: 0
|
||||||
@@ -61,7 +62,6 @@ BuildRequires: %{python_module black}
|
|||||||
BuildRequires: %{python_module dataclasses if %python-base < 3.7}
|
BuildRequires: %{python_module dataclasses if %python-base < 3.7}
|
||||||
BuildRequires: %{python_module hypothesis >= 4.36.0}
|
BuildRequires: %{python_module hypothesis >= 4.36.0}
|
||||||
BuildRequires: %{python_module hypothesmith >= 0.0.4}
|
BuildRequires: %{python_module hypothesmith >= 0.0.4}
|
||||||
BuildRequires: %{python_module isort >= 5.5.3}
|
|
||||||
BuildRequires: %{python_module typing-inspect >= 0.4.0}
|
BuildRequires: %{python_module typing-inspect >= 0.4.0}
|
||||||
BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
|
BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
|
||||||
%endif
|
%endif
|
||||||
@@ -90,7 +90,7 @@ rm \
|
|||||||
libcst/tests/test_pyre_integration.py
|
libcst/tests/test_pyre_integration.py
|
||||||
|
|
||||||
# gh#Instagram/LibCST#467
|
# gh#Instagram/LibCST#467
|
||||||
sed -i 's/import AbstractBaseMatcherNodeMeta/import Optional, AbstractBaseMatcherNodeMeta/' libcst/codegen/gen_matcher_classes.py
|
sed -i -e 's/import AbstractBaseMatcherNodeMeta/import Optional, AbstractBaseMatcherNodeMeta/' libcst/codegen/gen_matcher_classes.py
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
%build
|
%build
|
||||||
@@ -107,15 +107,8 @@ export CARGO_NET_OFFLINE=true PROFILE=release
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
# test_fuzz needs network access because of 'from hypothesmith import from_grammar'
|
%python_exec -m libcst.codegen.generate all
|
||||||
rm libcst/tests/test_fuzz.py
|
%pyunittest -v
|
||||||
|
|
||||||
%{python_exec # https://github.com/Instagram/LibCST/issues/331 + 467
|
|
||||||
$python -m libcst.codegen.generate matchers
|
|
||||||
$python -m libcst.codegen.generate return_types
|
|
||||||
$python -m libcst.codegen.generate visitors
|
|
||||||
$python -m unittest -v
|
|
||||||
}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
|
@@ -1,7 +1,21 @@
|
|||||||
Index: libcst-0.4.9/libcst/codemod/tests/test_codemod_cli.py
|
---
|
||||||
===================================================================
|
libcst/codegen/generate.py | 2 +-
|
||||||
--- libcst-0.4.9.orig/libcst/codemod/tests/test_codemod_cli.py
|
libcst/codemod/tests/test_codemod_cli.py | 4 ++--
|
||||||
+++ libcst-0.4.9/libcst/codemod/tests/test_codemod_cli.py
|
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
--- a/libcst/codegen/generate.py
|
||||||
|
+++ b/libcst/codegen/generate.py
|
||||||
|
@@ -69,7 +69,7 @@ def codegen_visitors() -> None:
|
||||||
|
# by attempting to run codegen again in a new process.
|
||||||
|
with open(os.devnull, "w") as devnull:
|
||||||
|
subprocess.check_call(
|
||||||
|
- ["python3", "-m", "libcst.codegen.gen_visitor_functions"],
|
||||||
|
+ [sys.executable, "-m", "libcst.codegen.gen_visitor_functions"],
|
||||||
|
cwd=base,
|
||||||
|
stdout=devnull,
|
||||||
|
)
|
||||||
|
--- a/libcst/codemod/tests/test_codemod_cli.py
|
||||||
|
+++ b/libcst/codemod/tests/test_codemod_cli.py
|
||||||
@@ -4,7 +4,7 @@
|
@@ -4,7 +4,7 @@
|
||||||
# LICENSE file in the root directory of this source tree.
|
# LICENSE file in the root directory of this source tree.
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user