forked from pool/python-Markdown
- Split the package into multibuild with tests separate (to
separate PyYAML dependency). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-Markdown?expand=0&rev=93
This commit is contained in:
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@@ -1,6 +1,10 @@
|
|||||||
--- Markdown-3.0/tests/test_legacy.py.orig 2018-10-18 20:59:01.521952070 +0200
|
---
|
||||||
+++ Markdown-3.0/tests/test_legacy.py 2018-10-18 20:59:20.746395446 +0200
|
tests/test_legacy.py | 1 +
|
||||||
@@ -29,6 +29,7 @@
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
--- a/tests/test_legacy.py
|
||||||
|
+++ b/tests/test_legacy.py
|
||||||
|
@@ -28,6 +28,7 @@ warnings.simplefilter('error')
|
||||||
# Except for the warnings that shouldn't
|
# Except for the warnings that shouldn't
|
||||||
warnings.filterwarnings('default', category=PendingDeprecationWarning)
|
warnings.filterwarnings('default', category=PendingDeprecationWarning)
|
||||||
warnings.filterwarnings('default', category=DeprecationWarning, module='markdown')
|
warnings.filterwarnings('default', category=DeprecationWarning, module='markdown')
|
||||||
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 12 14:47:54 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
|
||||||
|
|
||||||
|
- Split the package into multibuild with tests separate (to
|
||||||
|
separate PyYAML dependency).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 15 19:46:03 UTC 2024 - Benoît Monin <benoit.monin@gmx.fr>
|
Fri Mar 15 19:46:03 UTC 2024 - Benoît Monin <benoit.monin@gmx.fr>
|
||||||
|
|
||||||
|
@@ -17,7 +17,16 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-Markdown
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%endif
|
||||||
|
%if "%{flavor}" == ""
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
Name: python-Markdown%{psuffix}
|
||||||
Version: 3.6
|
Version: 3.6
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python implementation of Markdown
|
Summary: Python implementation of Markdown
|
||||||
@@ -26,7 +35,6 @@ Group: Development/Languages/Python
|
|||||||
URL: https://python-markdown.github.io/
|
URL: https://python-markdown.github.io/
|
||||||
Source: https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/M/Markdown/Markdown-%{version}.tar.gz
|
||||||
Patch0: markdown-3.0-python37.patch
|
Patch0: markdown-3.0-python37.patch
|
||||||
BuildRequires: %{python_module PyYAML}
|
|
||||||
BuildRequires: %{python_module base >= 3.8}
|
BuildRequires: %{python_module base >= 3.8}
|
||||||
BuildRequires: %{python_module importlib-metadata >= 4.4 if %python-base < 3.10}
|
BuildRequires: %{python_module importlib-metadata >= 4.4 if %python-base < 3.10}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
@@ -34,9 +42,11 @@ BuildRequires: %{python_module setuptools}
|
|||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%if 0%{?python_version_nodots} < 310
|
%if %{with test}
|
||||||
Requires: python-importlib-metadata >= 4.4
|
BuildRequires: %{python_module Markdown = %{version}}
|
||||||
|
BuildRequires: %{python_module PyYAML}
|
||||||
%endif
|
%endif
|
||||||
|
Requires: (python-importlib-metadata >= 4.4 if python-base < 3.10)
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
@@ -53,17 +63,24 @@ supported by the [Available Extensions][].
|
|||||||
%autosetup -p1 -n Markdown-%{version}
|
%autosetup -p1 -n Markdown-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if %{without test}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%python_clone -a %{buildroot}%{_bindir}/markdown_py
|
%python_clone -a %{buildroot}%{_bindir}/markdown_py
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
%pyunittest discover -v
|
%pyunittest discover -v
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%post
|
%post
|
||||||
%python_install_alternative markdown_py
|
%python_install_alternative markdown_py
|
||||||
|
|
||||||
@@ -76,5 +93,6 @@ supported by the [Available Extensions][].
|
|||||||
%python_alternative %{_bindir}/markdown_py
|
%python_alternative %{_bindir}/markdown_py
|
||||||
%{python_sitelib}/Markdown-%{version}*-info
|
%{python_sitelib}/Markdown-%{version}*-info
|
||||||
%{python_sitelib}/markdown
|
%{python_sitelib}/markdown
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user