diff --git a/python-markdown.spec b/python-markdown.spec index 06084f1..bd84edd 100644 --- a/python-markdown.spec +++ b/python-markdown.spec @@ -1,102 +1,64 @@ -%if 0%{?fedora} || 0%{?rhel} >= 7 -%bcond_without python3 -%else -%bcond_with python3 -%endif - %global srcname Markdown %global pkgname markdown Name: python-%{pkgname} -Version: 2.6.11 -Release: 5%{?dist} +Version: 3.0.1 +Release: 1%{?dist} Summary: Markdown implementation in Python License: BSD URL: https://python-markdown.github.io/ Source0: https://files.pythonhosted.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz -Patch0: markdown-2.6.11-python37.patch +# Cherry-picked upstream commit 0861bb0d +Patch0: Markdown-3.0.1-pyaml.patch BuildArch: noarch - %description -This is a Python implementation of John Gruber's Markdown. It is +This is a Python implementation of John Gruber’s Markdown. It is almost completely compliant with the reference implementation, though -there are a few known issues. +there are a few very minor differences. %package -n python2-%{pkgname} Summary: Markdown implementation in Python BuildRequires: python2-devel -BuildRequires: python2-nose -%if ! 0%{?rhel} BuildRequires: python2-yaml BuildRequires: python2-tidy -%else -BuildRequires: python-yaml -%endif %{?python_provide:%python_provide python2-%{pkgname}} %description -n python2-%{pkgname} -This is a Python implementation of John Gruber's Markdown. It is +This is a Python implementation of John Gruber’s Markdown. It is almost completely compliant with the reference implementation, though -there are a few known issues. +there are a few very minor differences. -%if %{with python3} %package -n python%{python3_pkgversion}-%{pkgname} Summary: Markdown implementation in Python BuildRequires: python%{python3_pkgversion}-devel -BuildRequires: python%{python3_pkgversion}-nose BuildRequires: python%{python3_pkgversion}-PyYAML -%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} -%if ! 0%{?rhel} BuildRequires: python%{python3_pkgversion}-tidy -%endif +%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}} %description -n python%{python3_pkgversion}-%{pkgname} This is a Python implementation of John Gruber's Markdown. It is almost completely compliant with the reference implementation, though there are a few known issues. -%endif # with python3 %prep -%autosetup -p0 -c -n %{srcname}-%{version} -mv %{srcname}-%{version} python2 - -%if %{with python3} -cp -a python2 python3 -%endif # with python3 - +%autosetup -p1 -n %{srcname}-%{version} %build -pushd python2 %py2_build -popd - -%if %{with python3} -pushd python3 %py3_build -popd -%endif # with python3 %install -pushd python2 %py2_install # rename binary mv %{buildroot}%{_bindir}/markdown_py{,-%{python2_version}} ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py-2 -# process license file -PYTHONPATH=%{buildroot}%{python2_sitelib} \ - %{buildroot}%{_bindir}/markdown_py-%{python2_version} \ - LICENSE.md > LICENSE.html -popd - -%if %{with python3} -pushd python3 %py3_install # rename binary @@ -107,49 +69,44 @@ ln -s markdown_py-%{python3_version} %{buildroot}%{_bindir}/markdown_py-3 PYTHONPATH=%{buildroot}%{python3_sitelib} \ %{buildroot}%{_bindir}/markdown_py-%{python3_version} \ LICENSE.md > LICENSE.html -popd -%endif # with python3 -# 2.X binary is called by default for now -ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py +# 3.X binary is called by default +ln -s markdown_py-%{python3_version} %{buildroot}%{_bindir}/markdown_py %check -pushd python2 -%{__python2} run-tests.py -v -popd - -%if %{with python3} -pushd python3 -%{__python3} run-tests.py -v -popd -%endif # with python3 +%{__python2} ./setup.py test +%{__python3} ./setup.py test %files -n python2-%{pkgname} # temporarily skip packaging docs - see also # https://github.com/Python-Markdown/markdown/issues/621 #doc python2/build/docs/* -%license python2/LICENSE.* +%license LICENSE.* %{python2_sitelib}/* %{_bindir}/markdown_py %{_bindir}/markdown_py-2 %{_bindir}/markdown_py-%{python2_version} -%if %{with python3} %files -n python%{python3_pkgversion}-%{pkgname} # temporarily skip packaging docs - see also # https://github.com/Python-Markdown/markdown/issues/621 #doc python3/build/docs/* -%license python3/LICENSE.* +%license LICENSE.* %{python3_sitelib}/* %{_bindir}/markdown_py-3 %{_bindir}/markdown_py-%{python3_version} -%endif # with python3 %changelog +* Mon Mar 25 2019 Thomas Moschny - 3.0.1-1 +- Update to 3.0.1. +- Simplify spec file. +- CLI tool uses Python3 now. +- Update BRs. + * Sat Feb 02 2019 Fedora Release Engineering - 2.6.11-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 3588136..9686844 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (Markdown-2.6.11.tar.gz) = 4e7dd3e04f181fa2751a359aede301fb29a23b9af74867ff9d1d0fdd051dcd16d04a5891e37aff0b309649c5fd13363802ec7e10fc33896e9453991efcab4a66 +SHA512 (Markdown-3.0.1.tar.gz) = c648c1b8ecb3c907ff2bd636ec6c08b4b629967fb916913f77db641f6d61b83d16929af2f15f5695c8cdb9614031606110e02a7e0bbb3aab0be38a8e285f12f1