Update to 3.0.1.
Simplify spec file. CLI tool uses Python3 now. Update BRs.
This commit is contained in:
parent
9dff5b6908
commit
494567a26d
@ -1,102 +1,64 @@
|
|||||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
||||||
%bcond_without python3
|
|
||||||
%else
|
|
||||||
%bcond_with python3
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global srcname Markdown
|
%global srcname Markdown
|
||||||
%global pkgname markdown
|
%global pkgname markdown
|
||||||
|
|
||||||
Name: python-%{pkgname}
|
Name: python-%{pkgname}
|
||||||
Version: 2.6.11
|
Version: 3.0.1
|
||||||
Release: 5%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Markdown implementation in Python
|
Summary: Markdown implementation in Python
|
||||||
License: BSD
|
License: BSD
|
||||||
URL: https://python-markdown.github.io/
|
URL: https://python-markdown.github.io/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
|
|
||||||
%description
|
%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
|
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}
|
%package -n python2-%{pkgname}
|
||||||
Summary: Markdown implementation in Python
|
Summary: Markdown implementation in Python
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-nose
|
|
||||||
%if ! 0%{?rhel}
|
|
||||||
BuildRequires: python2-yaml
|
BuildRequires: python2-yaml
|
||||||
BuildRequires: python2-tidy
|
BuildRequires: python2-tidy
|
||||||
%else
|
|
||||||
BuildRequires: python-yaml
|
|
||||||
%endif
|
|
||||||
%{?python_provide:%python_provide python2-%{pkgname}}
|
%{?python_provide:%python_provide python2-%{pkgname}}
|
||||||
|
|
||||||
%description -n 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
|
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}
|
%package -n python%{python3_pkgversion}-%{pkgname}
|
||||||
Summary: Markdown implementation in Python
|
Summary: Markdown implementation in Python
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: python%{python3_pkgversion}-nose
|
|
||||||
BuildRequires: python%{python3_pkgversion}-PyYAML
|
BuildRequires: python%{python3_pkgversion}-PyYAML
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
|
|
||||||
%if ! 0%{?rhel}
|
|
||||||
BuildRequires: python%{python3_pkgversion}-tidy
|
BuildRequires: python%{python3_pkgversion}-tidy
|
||||||
%endif
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-%{pkgname}
|
%description -n python%{python3_pkgversion}-%{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
|
almost completely compliant with the reference implementation, though
|
||||||
there are a few known issues.
|
there are a few known issues.
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p0 -c -n %{srcname}-%{version}
|
%autosetup -p1 -n %{srcname}-%{version}
|
||||||
mv %{srcname}-%{version} python2
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
cp -a python2 python3
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
pushd python2
|
|
||||||
%py2_build
|
%py2_build
|
||||||
popd
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
pushd python3
|
|
||||||
%py3_build
|
%py3_build
|
||||||
popd
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
pushd python2
|
|
||||||
%py2_install
|
%py2_install
|
||||||
|
|
||||||
# rename binary
|
# rename binary
|
||||||
mv %{buildroot}%{_bindir}/markdown_py{,-%{python2_version}}
|
mv %{buildroot}%{_bindir}/markdown_py{,-%{python2_version}}
|
||||||
ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py-2
|
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
|
%py3_install
|
||||||
|
|
||||||
# rename binary
|
# rename binary
|
||||||
@ -107,49 +69,44 @@ ln -s markdown_py-%{python3_version} %{buildroot}%{_bindir}/markdown_py-3
|
|||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
PYTHONPATH=%{buildroot}%{python3_sitelib} \
|
||||||
%{buildroot}%{_bindir}/markdown_py-%{python3_version} \
|
%{buildroot}%{_bindir}/markdown_py-%{python3_version} \
|
||||||
LICENSE.md > LICENSE.html
|
LICENSE.md > LICENSE.html
|
||||||
popd
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
# 2.X binary is called by default for now
|
# 3.X binary is called by default
|
||||||
ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py
|
ln -s markdown_py-%{python3_version} %{buildroot}%{_bindir}/markdown_py
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
pushd python2
|
%{__python2} ./setup.py test
|
||||||
%{__python2} run-tests.py -v
|
%{__python3} ./setup.py test
|
||||||
popd
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
pushd python3
|
|
||||||
%{__python3} run-tests.py -v
|
|
||||||
popd
|
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-%{pkgname}
|
%files -n python2-%{pkgname}
|
||||||
# temporarily skip packaging docs - see also
|
# temporarily skip packaging docs - see also
|
||||||
# https://github.com/Python-Markdown/markdown/issues/621
|
# https://github.com/Python-Markdown/markdown/issues/621
|
||||||
#doc python2/build/docs/*
|
#doc python2/build/docs/*
|
||||||
%license python2/LICENSE.*
|
%license LICENSE.*
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%{_bindir}/markdown_py
|
%{_bindir}/markdown_py
|
||||||
%{_bindir}/markdown_py-2
|
%{_bindir}/markdown_py-2
|
||||||
%{_bindir}/markdown_py-%{python2_version}
|
%{_bindir}/markdown_py-%{python2_version}
|
||||||
|
|
||||||
|
|
||||||
%if %{with python3}
|
|
||||||
%files -n python%{python3_pkgversion}-%{pkgname}
|
%files -n python%{python3_pkgversion}-%{pkgname}
|
||||||
# temporarily skip packaging docs - see also
|
# temporarily skip packaging docs - see also
|
||||||
# https://github.com/Python-Markdown/markdown/issues/621
|
# https://github.com/Python-Markdown/markdown/issues/621
|
||||||
#doc python3/build/docs/*
|
#doc python3/build/docs/*
|
||||||
%license python3/LICENSE.*
|
%license LICENSE.*
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%{_bindir}/markdown_py-3
|
%{_bindir}/markdown_py-3
|
||||||
%{_bindir}/markdown_py-%{python3_version}
|
%{_bindir}/markdown_py-%{python3_version}
|
||||||
%endif # with python3
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 25 2019 Thomas Moschny <thomas.moschny@gmx.de> - 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 <releng@fedoraproject.org> - 2.6.11-5
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.11-5
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
SHA512 (Markdown-2.6.11.tar.gz) = 4e7dd3e04f181fa2751a359aede301fb29a23b9af74867ff9d1d0fdd051dcd16d04a5891e37aff0b309649c5fd13363802ec7e10fc33896e9453991efcab4a66
|
SHA512 (Markdown-3.0.1.tar.gz) = c648c1b8ecb3c907ff2bd636ec6c08b4b629967fb916913f77db641f6d61b83d16929af2f15f5695c8cdb9614031606110e02a7e0bbb3aab0be38a8e285f12f1
|
||||||
|
Loading…
Reference in New Issue
Block a user