Update to 2.6.1.
- Apply updated Python packaging guidelines.
This commit is contained in:
parent
fd25aa98e2
commit
aa6be0cc8d
1
.gitignore
vendored
1
.gitignore
vendored
@ -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
|
||||
|
@ -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 <thomas.moschny@gmx.de> - 2.6.1-1
|
||||
- Update to 2.6.1.
|
||||
- Apply updated Python packaging guidelines.
|
||||
|
||||
* Sun Feb 22 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
|
||||
- Update to 2.6.
|
||||
- Update the upstream URL.
|
||||
|
Loading…
Reference in New Issue
Block a user