forked from pool/python-executing
- Split test run into separate build using _multibuild.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-executing?expand=0&rev=20
This commit is contained in:
@@ -16,8 +16,16 @@
|
||||
#
|
||||
|
||||
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%endif
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-executing
|
||||
Name: python-executing%{psuffix}
|
||||
Version: 2.1.0
|
||||
Release: 0
|
||||
Summary: Get the currently executing AST node of a frame, and other information
|
||||
@@ -26,20 +34,21 @@ URL: https://github.com/alexmojaki/executing
|
||||
Source: https://files.pythonhosted.org/packages/source/e/executing/executing-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM https://github.com/alexmojaki/executing/pull/86 fix: backward compatibility fix for changed source positions in 3.12.6
|
||||
Patch0: new-python-312.patch
|
||||
BuildRequires: %{python_module asttokens}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module ipython}
|
||||
BuildRequires: %{python_module littleutils}
|
||||
BuildRequires: %{python_module pip}
|
||||
# START TESTING SECION
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools_scm >= 4.0.0}
|
||||
BuildRequires: %{python_module toml}
|
||||
BuildRequires: %{python_module wheel}
|
||||
# END TESTING SECION
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module asttokens}
|
||||
BuildRequires: %{python_module ipython}
|
||||
BuildRequires: %{python_module littleutils}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module rich}
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
@@ -49,19 +58,27 @@ Get the currently executing AST node of a frame, and other information
|
||||
%autosetup -p1 -n executing-%{version}
|
||||
|
||||
%build
|
||||
%if %{without test}
|
||||
%pyproject_wheel
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{without test}
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
%pytest
|
||||
%endif
|
||||
|
||||
%if %{without test}
|
||||
%files %{python_files}
|
||||
%doc README.md
|
||||
%license LICENSE.txt
|
||||
%{python_sitelib}/executing
|
||||
%{python_sitelib}/executing-%{version}.dist-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user