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.1.tar.gz
|
||||||
/Markdown-2.5.2.tar.gz
|
/Markdown-2.5.2.tar.gz
|
||||||
/Markdown-2.6.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}
|
%if 0%{?fedora}
|
||||||
%global with_python3 1
|
%global with_python3 1
|
||||||
%{!?python3_version: %global python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")}
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%define srcname Markdown
|
%define srcname Markdown
|
||||||
|
|
||||||
Name: python-markdown
|
Name: python-markdown
|
||||||
Version: 2.6
|
Version: 2.6.1
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Markdown implementation in Python
|
Summary: Markdown implementation in Python
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
@ -16,15 +13,15 @@ License: BSD
|
|||||||
URL: https://pythonhosted.org/%{srcname}/
|
URL: https://pythonhosted.org/%{srcname}/
|
||||||
Source0: http://pypi.python.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/M/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python-devel >= 2.6
|
BuildRequires: python2-devel >= 2.6
|
||||||
BuildRequires: python-nose
|
BuildRequires: python-nose
|
||||||
BuildRequires: PyYAML
|
BuildRequires: PyYAML
|
||||||
Requires: python >= 2.6
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
BuildRequires: python3-devel >= 3.1
|
BuildRequires: python3-devel >= 3.1
|
||||||
BuildRequires: python3-nose
|
BuildRequires: python3-nose
|
||||||
BuildRequires: python3-PyYAML
|
BuildRequires: python3-PyYAML
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
Requires: python2 >= 2.6
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -48,7 +45,9 @@ there are a few known issues.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -qc -n %{srcname}-%{version}
|
||||||
|
|
||||||
|
pushd %{srcname}-%{version}
|
||||||
|
|
||||||
# remove shebangs
|
# remove shebangs
|
||||||
find markdown -type f -name '*.py' \
|
find markdown -type f -name '*.py' \
|
||||||
@ -58,66 +57,79 @@ find markdown -type f -name '*.py' \
|
|||||||
find bin docs -type f \
|
find bin docs -type f \
|
||||||
-exec sed -i 's/\r//' {} \;
|
-exec sed -i 's/\r//' {} \;
|
||||||
|
|
||||||
|
popd
|
||||||
|
|
||||||
|
mv %{srcname}-%{version} python2
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
cp -a . %{py3dir}
|
cp -a python2 python3
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
pushd python2
|
||||||
|
%{__python2} setup.py build
|
||||||
|
popd
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd python3
|
||||||
%{__python3} setup.py build
|
%{__python3} setup.py build
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
pushd python2
|
||||||
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
# rename binary
|
# rename binary
|
||||||
mv %{buildroot}%{_bindir}/markdown_py{,-%{python_version}}
|
mv %{buildroot}%{_bindir}/markdown_py{,-%{python_version}}
|
||||||
|
popd
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd python3
|
||||||
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
popd
|
|
||||||
|
|
||||||
# rename binary
|
# rename binary
|
||||||
mv %{buildroot}%{_bindir}/markdown_py{,-%{python3_version}}
|
mv %{buildroot}%{_bindir}/markdown_py{,-%{python3_version}}
|
||||||
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
# 2.X binary is called by default for now
|
# 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
|
%check
|
||||||
%{__python} run-tests.py
|
pushd python2
|
||||||
|
%{__python2} run-tests.py
|
||||||
|
popd
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
pushd %{py3dir}
|
pushd python3
|
||||||
%{__python3} run-tests.py
|
%{__python3} run-tests.py
|
||||||
popd
|
popd
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc build/docs/*
|
%doc python2/build/docs/*
|
||||||
%{python_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%{_bindir}/markdown_py
|
%{_bindir}/markdown_py
|
||||||
%{_bindir}/markdown_py-%{python_version}
|
%{_bindir}/markdown_py-%{python2_version}
|
||||||
|
|
||||||
|
|
||||||
%if 0%{?with_python3}
|
%if 0%{?with_python3}
|
||||||
%files -n python3-markdown
|
%files -n python3-markdown
|
||||||
%doc build/docs/*
|
%doc python3/build/docs/*
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%{_bindir}/markdown_py-%{python3_version}
|
%{_bindir}/markdown_py-%{python3_version}
|
||||||
%endif # with_python3
|
%endif # with_python3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Sun Feb 22 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.6-1
|
||||||
- Update to 2.6.
|
- Update to 2.6.
|
||||||
- Update the upstream URL.
|
- Update the upstream URL.
|
||||||
|
Loading…
Reference in New Issue
Block a user