diff --git a/python-gfm.spec b/python-gfm.spec index 4505b67..ffe484f 100644 --- a/python-gfm.spec +++ b/python-gfm.spec @@ -1,13 +1,8 @@ %global pypi_name py-gfm -# Python 3 only for Fedora for now. -%if 0%{?fedora} -%global with_python3 1 -%endif - Name: python-gfm Version: 0.1.3 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Github-Flavored Markdown for Python-Markdown License: BSD URL: https://github.com/Zopieux/py-gfm @@ -15,6 +10,7 @@ Source0: https://files.pythonhosted.org/packages/source/%(n=%{pypi_name}; # Missing LICENSE file in pypi package reported at https://github.com/Zopieux/py-gfm/issues/5 Source1: https://github.com/Zopieux/py-gfm/blob/master/LICENSE + BuildArch: noarch BuildRequires: python2-devel %if 0%{?fedora} @@ -24,11 +20,10 @@ BuildRequires: python2-setuptools BuildRequires: python-markdown BuildRequires: python-setuptools %endif -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-markdown -BuildRequires: python3-setuptools -%endif # if with_python3 +BuildRequires: python%{python3_pkgversion}-devel +BuildRequires: python%{python3_pkgversion}-markdown +BuildRequires: python%{python3_pkgversion}-setuptools + %description This is an implementation of GitHub-Flavored Markdown written as an extension @@ -44,24 +39,20 @@ Requires: python2-markdown %else Requires: python-markdown %endif - %description -n python2-gfm This is an implementation of GitHub-Flavored Markdown written as an extension to the Python Markdown library. It aims for maximal compatibility with GitHub's rendering. -%if 0%{?with_python3} -%package -n python3-gfm +%package -n python%{python3_pkgversion}-gfm Summary: %{summary} -%{?python_provide:%python_provide python3-gfm} -Requires: python3-markdown - -%description -n python3-gfm +%{?python_provide:%python_provide python%{python3_pkgversion}-gfm} +Requires: python%{python3_pkgversion}-markdown +%description -n python%{python3_pkgversion}-gfm This is an implementation of GitHub-Flavored Markdown written as an extension to the Python Markdown library. It aims for maximal compatibility with GitHub's rendering. -%endif # if with_python3 %prep @@ -71,23 +62,17 @@ cp %{SOURCE1} . %build %py2_build -%if 0%{?with_python3} %py3_build -%endif # if with_python3 %install %py2_install -%if 0%{?with_python3} %py3_install -%endif # if with_python3 %check %{__python2} setup.py test -%if 0%{?with_python3} %{__python3} setup.py test -%endif # if with_python3 %files -n python2-gfm @@ -96,15 +81,16 @@ cp %{SOURCE1} . %{python2_sitelib}/* -%if 0%{?with_python3} -%files -n python3-gfm +%files -n python%{python3_pkgversion}-gfm %license LICENSE %doc README.rst %{python3_sitelib}/* -%endif # if with_python3 %changelog +* Sat Oct 29 2016 Germano Massullo +- + * Fri Aug 19 2016 Thomas Moschny - 0.1.3-2 - Spec file cleanup, allow building on EPEL7.