Update to 2.6.4.

- Follow updated Python packaging guidelines.
This commit is contained in:
Thomas Moschny 2015-11-21 12:34:58 +01:00
parent f0e6ddf4c7
commit 96acba7db8
3 changed files with 32 additions and 52 deletions

16
.gitignore vendored
View File

@ -1,15 +1 @@
Markdown-2.0.3.tar.gz
/Markdown-2.1.0.tar.gz
/Markdown-2.1.1.tar.gz
/Markdown-2.2.0.tar.gz
/Markdown-2.2.1.tar.gz
/Markdown-2.3.tar.gz
/Markdown-2.3.1.tar.gz
/Markdown-2.4.tar.gz
/Markdown-2.4.1.tar.gz
/Markdown-2.5.tar.gz
/Markdown-2.5.1.tar.gz
/Markdown-2.5.2.tar.gz
/Markdown-2.6.tar.gz
/Markdown-2.6.1.tar.gz
/Markdown-2.6.2.tar.gz
/Markdown-*.tar.gz

View File

@ -1,27 +1,19 @@
%if 0%{?fedora}
%global with_python3 1
%endif
%define srcname Markdown
Name: python-markdown
Version: 2.6.2
Release: 3%{?dist}
Version: 2.6.4
Release: 1%{?dist}
Summary: Markdown implementation in Python
Group: Development/Languages
License: BSD
URL: https://pythonhosted.org/%{srcname}/
Source0: http://pypi.python.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel >= 2.6
BuildRequires: python-nose
BuildRequires: PyYAML
%if 0%{?with_python3}
BuildRequires: python3-devel >= 3.1
BuildRequires: python2-devel
BuildRequires: python2-nose
BuildRequires: python2-yaml
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: python3-PyYAML
%endif # with_python3
Requires: python2 >= 2.6
%description
@ -30,23 +22,28 @@ almost completely compliant with the reference implementation, though
there are a few known issues.
%if 0%{?with_python3}
%package -n python2-markdown
Summary: Markdown implementation in Python
%{?python_provide:%python_provide python2-markdown}
%description -n python2-markdown
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.
%package -n python3-markdown
Summary: Markdown implementation in Python
Group: Development/Languages
Requires: python3 >= 3.1
%{?python_provide:%python_provide python3-markdown}
%description -n python3-markdown
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
%setup -qc -n %{srcname}-%{version}
pushd %{srcname}-%{version}
# remove shebangs
@ -58,31 +55,27 @@ find bin docs -type f \
-exec sed -i 's/\r//' {} \;
popd
mv %{srcname}-%{version} python2
%if 0%{?with_python3}
cp -a python2 python3
%endif # with_python3
%build
pushd python2
%{__python2} setup.py build
%py2_build
popd
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py build
%py3_build
popd
%endif # with_python3
%install
pushd python2
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
%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} \
@ -90,19 +83,18 @@ PYTHONPATH=%{buildroot}%{python2_sitelib} \
LICENSE.md > LICENSE.html
popd
%if 0%{?with_python3}
pushd python3
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%py3_install
# rename binary
mv %{buildroot}%{_bindir}/markdown_py{,-%{python3_version}}
ln -s markdown_py-%{python3_version} %{buildroot}%{_bindir}/markdown_py-3
# process license file
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
@ -113,31 +105,33 @@ pushd python2
%{__python2} run-tests.py
popd
%if 0%{?with_python3}
pushd python3
%{__python3} run-tests.py
popd
%endif # with_python3
%files
%files -n python2-markdown
%doc python2/build/docs/*
%license python2/LICENSE.*
%{python2_sitelib}/*
%{_bindir}/markdown_py
%{_bindir}/markdown_py-2
%{_bindir}/markdown_py-%{python2_version}
%if 0%{?with_python3}
%files -n python3-markdown
%doc python3/build/docs/*
%license python3/LICENSE.*
%{python3_sitelib}/*
%{_bindir}/markdown_py-3
%{_bindir}/markdown_py-%{python3_version}
%endif # with_python3
%changelog
* Sat Nov 21 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.4-1
- Update to 2.6.4.
- Follow updated Python packaging guidelines.
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.2-3
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5

View File

@ -1 +1 @@
256d19afcc564dc4ce4c229bb762f7ae Markdown-2.6.2.tar.gz
4e8b4d22af82e0d92811938fb283be90 Markdown-2.6.4.tar.gz