- Switch to multibuild in order to avoid buildcycles
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-libcst?expand=0&rev=2
This commit is contained in:
parent
958485465e
commit
2ba3ad95cc
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
</multibuild>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Aug 21 09:43:55 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Switch to multibuild in order to avoid buildcycles
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Aug 8 04:41:45 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
|
@ -17,31 +17,39 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-libcst
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
Name: python-libcst%{psuffix}
|
||||
Version: 0.3.9
|
||||
Release: 0
|
||||
Summary: Python 3.5+ concrete syntax tree with AST-like properties
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/Instagram/LibCST
|
||||
Source: https://files.pythonhosted.org/packages/source/l/libcst/libcst-%{version}.tar.gz
|
||||
Source1: https://raw.githubusercontent.com/Instagram/LibCST/master/libcst/codemod/tests/codemod_formatter_error_input.py.txt
|
||||
# all the deps over setuptools are for the generateor fix
|
||||
BuildRequires: %{python_module black}
|
||||
BuildRequires: %{python_module isort}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module typing-inspect >= 0.4.0}
|
||||
BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-PyYAML >= 5.2
|
||||
Requires: python-typing-inspect >= 0.4.0
|
||||
Requires: python-typing_extensions >= 3.7.4.2
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module PyYAML >= 5.2}
|
||||
BuildRequires: %{python_module black}
|
||||
BuildRequires: %{python_module hypothesis >= 4.36.0}
|
||||
BuildRequires: %{python_module hypothesmith >= 0.0.4}
|
||||
BuildRequires: %{python_module isort}
|
||||
BuildRequires: %{python_module typing_extensions >= 3.7.4.2}
|
||||
BuildRequires: %{python_module typing-inspect >= 0.4.0}
|
||||
# /SECTION
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@ -67,6 +75,7 @@ sed -i 's/"error: .* stack:",/"Transformed 1 files successfully.",/' libcst/code
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%if !%{with test}
|
||||
%python_install
|
||||
%{python_expand # https://github.com/Instagram/LibCST/issues/331
|
||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||
@ -80,14 +89,19 @@ rm -r %{buildroot}%{$python_sitelib}/libcst/tests/ \
|
||||
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%python_exec -m unittest -v
|
||||
%endif
|
||||
|
||||
%if !%{with test}
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/libcst
|
||||
%{python_sitelib}/libcst-%{version}-py*.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Loading…
Reference in New Issue
Block a user