From 45fcce821e65bec7023416a547bc8cf4b3a54cd0 Mon Sep 17 00:00:00 2001 From: Nikola Forró Date: Nov 17 2022 16:19:28 +0000 Subject: Update to 0.3.1 - resolves: #2143559 --- diff --git a/.gitignore b/.gitignore index 604f427..383dbed 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,4 @@ /m2r-0.1.15.tar.gz /m2r-0.2.0.tar.gz /m2r-66f4a5a.tar.gz +/m2r-0.3.1.tar.gz diff --git a/python-m2r.spec b/python-m2r.spec index 0233435..e6cd118 100644 --- a/python-m2r.spec +++ b/python-m2r.spec @@ -9,27 +9,25 @@ M2R converts a markdown file including reST markups to a valid reST format.} %bcond_without check -%global commit 66f4a5a500cdd9fc59085106bff082c9cadafaf3 -%global shortcommit %(c=%{commit}; echo ${c:0:7}) -%global snapshotdate 20190604 - Name: python-%{srcname} -Version: 0.2.1 -Release: %autorelease -s %{snapshotdate}git%{shortcommit} +Version: 0.3.1 +Release: %autorelease Summary: Markdown to reStructuredText converter License: MIT URL: https://github.com/miyakogi/%{srcname} -Source0: %url/archive/%{commit}/%{srcname}-%{shortcommit}.tar.gz - -# https://github.com/miyakogi/m2r/pull/67 -Patch0: compatibility_fixes.patch +Source0: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: make BuildRequires: python3-devel +%if %{with check} +BuildRequires: python3-pygments +BuildRequires: python3-pytest +%endif + %description %{desc} @@ -38,51 +36,41 @@ BuildRequires: python3-devel %package -n python3-%{srcname} Summary: %{summary} -%description -n python3-%{srcname} %{common_description} - -%package doc -Summary: Documentation for %{name} -%description doc -%{common_description} +%description -n python3-%{srcname} %{common_description} -Documentation for %name. %prep -%autosetup -p1 -n %{srcname}-%{commit} - -# https://github.com/sphinx-doc/sphinx/issues/10474 -sed -i "s/language = None/language = 'en'/" docs/conf.py +%autosetup -p1 -n %{srcname}-%{version} # Remove shebang sed -i '1{\@^#!/usr/bin/env python@d}' m2r.py + %generate_buildrequires -%pyproject_buildrequires -t +%pyproject_buildrequires + %build %pyproject_wheel -PYTHONPATH=${PWD} sphinx-build-3 docs html -# remove the sphinx-build leftovers -rm -rf html/.{doctrees,buildinfo} %install %pyproject_install %pyproject_save_files %{libname} + %if %{with check} %check -%tox +%pytest %endif + %files -n python3-%{srcname} -f %{pyproject_files} +%license LICENSE %doc README.md %{_bindir}/m2r -%files doc -%doc html -%license LICENSE %changelog %autochangelog diff --git a/sources b/sources index 4dc9be8..dd2b3d4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (m2r-66f4a5a.tar.gz) = 021b0c33b4967c2d805e587493f1abedd1730eff8c9c851cbe05956bbb6a8a6696b86cd80895504e47f149e8c6c9b6122bb88a23ee8ae3eafe4d9b1a7e510003 +SHA512 (m2r-0.3.1.tar.gz) = 9414d33c8a8f5246a21e92ebc9370f0f3de9c9636eb63b42f0367edef6e7eba24adcc31f2813ef5bbd601d4638bedc0c2ca7c5d18836fc883874dec688959b1d