From: Jan Palus Date: Sat, 1 Sep 2018 18:40:02 +0000 (+0200) Subject: new (version 2.15.2) X-Git-Tag: auto/th/python-pyPEG2-2.15.2-1 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=579a192deb737c2b9e5196db37edd742d807fcfd;p=packages%2Fpython-pyPEG2.git new (version 2.15.2) --- 579a192deb737c2b9e5196db37edd742d807fcfd diff --git a/python-pyPEG2.spec b/python-pyPEG2.spec new file mode 100644 index 0000000..0499fa4 --- /dev/null +++ b/python-pyPEG2.spec @@ -0,0 +1,82 @@ +# +# Conditional build: +%bcond_without python2 # CPython 2.x module +%bcond_without python3 # CPython 3.x module + +Summary: An intrinsic PEG Parser-Interpreter for Python +Name: python-pyPEG2 +Version: 2.15.2 +Release: 1 +License: GPLv2+ +Group: Libraries/Python +Source0: http://fdik.org/pyPEG2/pyPEG2-%{version}.tar.gz +# Source0-md5: 2ff44bc843c61ccd3951ef66a9e4a2b0 +URL: http://fdik.org/pyPEG2 +%if %{with python2} +BuildRequires: python-modules >= 1:2.7 +BuildRequires: python-setuptools +%endif +%if %{with python3} +BuildRequires: python3-modules >= 1:3.3 +BuildRequires: python3-setuptools +%endif +BuildRequires: rpm-pythonprov +BuildRequires: rpmbuild(macros) >= 1.714 +Requires: python-modules >= 1:2.7 +BuildArch: noarch +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +An intrinsic PEG Parser-Interpreter for Python. + +%package -n python3-pyPEG2 +Summary: Python 3 bindings for an intrinsic PEG Parser-Interpreter for Python +Group: Libraries/Python +Requires: python3-modules >= 1:3.3 + +%description -n python3-pyPEG2 +An intrinsic PEG Parser-Interpreter for Python. + +%prep +%setup -q -n pyPEG2-%{version} + +%build +%if %{with python2} +%py_build +%endif + +%if %{with python3} +%py3_build +%endif + +%install +rm -rf $RPM_BUILD_ROOT + +%if %{with python2} +%py_install + +%py_postclean +%endif + +%if %{with python3} +%py3_install +%endif + +%clean +rm -rf $RPM_BUILD_ROOT + +%if %{with python2} +%files +%defattr(644,root,root,755) +%doc CHANGES.txt README.txt TODO.txt +%{py_sitescriptdir}/pypeg2 +%{py_sitescriptdir}/pyPEG2-%{version}-py*.egg-info +%endif + +%if %{with python3} +%files -n python3-pyPEG2 +%defattr(644,root,root,755) +%doc CHANGES.txt README.txt TODO.txt +%{py3_sitescriptdir}/pypeg2 +%{py3_sitescriptdir}/pyPEG2-%{version}-py*.egg-info +%endif