From aa6be0cc8dddd0194df0dd2b0c436a60d8764844 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 14 Mar 2015 14:53:15 +0100 Subject: [PATCH] Update to 2.6.1. - Apply updated Python packaging guidelines. --- .gitignore | 1 + python-markdown.spec | 52 +++++++++++++++++++++++++++----------------- sources | 2 +- 3 files changed, 34 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 7dff644..6a121f5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ Markdown-2.0.3.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 diff --git a/python-markdown.spec b/python-markdown.spec index 11fcc69..653ab09 100644 --- a/python-markdown.spec +++ b/python-markdown.spec @@ -1,14 +1,11 @@ -%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} - %if 0%{?fedora} %global with_python3 1 -%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")} %endif %define srcname Markdown Name: python-markdown -Version: 2.6 +Version: 2.6.1 Release: 1%{?dist} Summary: Markdown implementation in Python Group: Development/Languages @@ -16,15 +13,15 @@ License: BSD URL: https://pythonhosted.org/%{srcname}/ Source0: http://pypi.python.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch -BuildRequires: python-devel >= 2.6 +BuildRequires: python2-devel >= 2.6 BuildRequires: python-nose BuildRequires: PyYAML -Requires: python >= 2.6 %if 0%{?with_python3} BuildRequires: python3-devel >= 3.1 BuildRequires: python3-nose BuildRequires: python3-PyYAML %endif # with_python3 +Requires: python2 >= 2.6 %description @@ -48,7 +45,9 @@ there are a few known issues. %prep -%setup -q -n %{srcname}-%{version} +%setup -qc -n %{srcname}-%{version} + +pushd %{srcname}-%{version} # remove shebangs find markdown -type f -name '*.py' \ @@ -58,66 +57,79 @@ find markdown -type f -name '*.py' \ find bin docs -type f \ -exec sed -i 's/\r//' {} \; +popd + +mv %{srcname}-%{version} python2 %if 0%{?with_python3} -cp -a . %{py3dir} +cp -a python2 python3 %endif # with_python3 %build -%{__python} setup.py build +pushd python2 +%{__python2} setup.py build +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 %{__python3} setup.py build popd %endif # with_python3 %install -%{__python} setup.py install -O1 --skip-build --root %{buildroot} +pushd python2 +%{__python2} setup.py install -O1 --skip-build --root %{buildroot} # rename binary mv %{buildroot}%{_bindir}/markdown_py{,-%{python_version}} +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 %{__python3} setup.py install -O1 --skip-build --root %{buildroot} -popd # rename binary mv %{buildroot}%{_bindir}/markdown_py{,-%{python3_version}} +popd %endif # with_python3 # 2.X binary is called by default for now -ln -s markdown_py-%{python_version} %{buildroot}%{_bindir}/markdown_py +ln -s markdown_py-%{python2_version} %{buildroot}%{_bindir}/markdown_py %check -%{__python} run-tests.py +pushd python2 +%{__python2} run-tests.py +popd %if 0%{?with_python3} -pushd %{py3dir} +pushd python3 %{__python3} run-tests.py popd %endif # with_python3 %files -%doc build/docs/* -%{python_sitelib}/* +%doc python2/build/docs/* +%{python2_sitelib}/* %{_bindir}/markdown_py -%{_bindir}/markdown_py-%{python_version} +%{_bindir}/markdown_py-%{python2_version} %if 0%{?with_python3} %files -n python3-markdown -%doc build/docs/* +%doc python3/build/docs/* %{python3_sitelib}/* %{_bindir}/markdown_py-%{python3_version} %endif # with_python3 %changelog +* Sat Mar 14 2015 Thomas Moschny - 2.6.1-1 +- Update to 2.6.1. +- Apply updated Python packaging guidelines. + * Sun Feb 22 2015 Thomas Moschny - 2.6-1 - Update to 2.6. - Update the upstream URL. diff --git a/sources b/sources index 3d25ae9..8124da6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8667532c78fc3b411be979447ea21be2 Markdown-2.6.tar.gz +c084f9d2fd0a839639fd9aa8c442d5cd Markdown-2.6.1.tar.gz