Compare commits

5 Commits

2 changed files with 24 additions and 11 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Thu Jun 5 11:04:21 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Mon Jun 2 09:01:56 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build
-------------------------------------------------------------------
Mon May 25 06:50:47 UTC 2020 - Petr Gajdos <pgajdos@suse.com>

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-misaka
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,7 +16,7 @@
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%bcond_without libalternatives
Name: python-misaka
Version: 2.1.1
Release: 0
@@ -27,13 +27,15 @@ URL: https://github.com/FSX/misaka
Source: https://files.pythonhosted.org/packages/source/m/misaka/misaka-%{version}.tar.gz
BuildRequires: %{python_module cffi >= 1.12.0}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: tidy
Requires: alts
Requires: python-cffi >= 1.12.0
Requires(post): update-alternatives
Requires(postun): update-alternatives
%python_subpackages
%description
@@ -43,10 +45,10 @@ A CFFI binding for Hoedown_ (version 3), a markdown parsing library.
%setup -q -n misaka-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/misaka
%python_expand %fdupes %{buildroot}%{$python_sitearch}
@@ -55,16 +57,17 @@ A CFFI binding for Hoedown_ (version 3), a markdown parsing library.
$python tests/run_tests.py
}
%post
%python_install_alternative misaka
%pre
# removing old update-alternatives entries
%python_libalternatives_reset_alternative misaka
%postun
%python_uninstall_alternative misaka
# post and postun calls are not needed with libalternatives only
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%python_alternative %{_bindir}/misaka
%{python_sitearch}/*
%{python_sitearch}/misaka
%{python_sitearch}/misaka-%{version}*-info
%changelog