2023-03-28 07:40:05 +00:00
committed by Git OBS Bridge
parent aa8efbcfe3
commit 8db23da62e
3 changed files with 28 additions and 4 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Mar 28 07:39:58 UTC 2023 - Matej Cepl <mcepl@suse.com>
- Split building and testing build
-------------------------------------------------------------------
Sat Mar 18 10:16:45 UTC 2023 - Johannes Kastl <kastl@b1-systems.de>

View File

@@ -1,5 +1,5 @@
#
# spec file for package python-mkdocs-material-extensions
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
@@ -16,23 +16,33 @@
#
Name: python-mkdocs-material-extensions
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-mkdocs-material-extensions%{psuffix}
Version: 1.1.1
Release: 0
Summary: Extension pack for Python Markdown
License: MIT
URL: https://github.com/facelessuser/mkdocs-material-extensions
Source: https://files.pythonhosted.org/packages/source/m/mkdocs_material_extensions/mkdocs_material_extensions-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: %{python_module hatch}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module beautifulsoup4}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module Markdown}
BuildRequires: %{python_module mkdocs-material}
BuildRequires: %{python_module pytest}
# /SECTION
%endif
BuildRequires: fdupes
BuildArch: noarch
%python_subpackages
@@ -47,17 +57,23 @@ Extension pack for Python Markdown
%pyproject_wheel
%install
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
# skip TestEmoji.test_twemoji that needs internet access
%pytest -k 'not test_twemoji'
%endif
%if %{without test}
%files %{python_files}
%doc README.md changelog.md
%license LICENSE.md
%{python_sitelib}/materialx
%{python_sitelib}/mkdocs_material_extensions-%{version}.dist-info
%endif
%changelog