%global srcname Pyped %global sum Replace sed/grep/cut/awk by letting you execute Python one-liners Name: python-%{srcname} Version: 1.4 Release: 2%{?dist} Summary: %{sum} License: GPLv2 URL: http://pypi.python.org/pypi/%{srcname} Source0: http://pypi.python.org/packages/source/P/%{srcname}/%{srcname}-%{version}.tar.gz Patch0: Pyped-1.4-encoding.patch BuildArch: noarch BuildRequires: python2-devel python3-devel %description Pyped is a command-line tool that let you process another command output with a Python one-liner like Perl or AWK. %package -n python2-%{srcname} Requires: python2-minibelt Requires: python-arrow Requires: python-requests Requires: python-path Requires: python-six Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Pyped is a command-line tool that let you process another command output with a Python one-liner like Perl or AWK. %package -n python3-%{srcname} Requires: python3-minibelt Requires: python3-arrow Requires: python3-requests Requires: python3-path Requires: python3-six Summary: %{sum} %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{srcname} Pyped is a command-line tool that let you process another command output with a Python one-liner like Perl or AWK. %prep %autosetup -n %{srcname}-%{version} rm -rf Pyped.egg-info %build %py2_build %py3_build %install %py3_install chmod a+x %{buildroot}%{python3_sitelib}/pyped.py mv %{buildroot}%{_bindir}/pyp %{buildroot}%{_bindir}/pyp-%{python3_version} ln -s %{_bindir}/pyp-%{python3_version} %{buildroot}%{_bindir}/pyp-3 %py2_install chmod a+x %{buildroot}%{python2_sitelib}/pyped.py mv %{buildroot}%{_bindir}/pyp %{buildroot}%{_bindir}/pyp-%{python2_version} ln -s %{_bindir}/pyp-%{python2_version} %{buildroot}%{_bindir}/pyp %check %files -n python2-%{srcname} %license licence.txt %doc README.md %{python2_sitelib}/pyped* %{python2_sitelib}/Pyped* %{_bindir}/pyp-%{python2_version} %{_bindir}/pyp %files -n python3-%{srcname} %license licence.txt %doc README.md %{python3_sitelib}/pyped* %{python3_sitelib}/Pyped* %{python3_sitelib}/__pycache__/pyped.* %{_bindir}/pyp-%{python3_version} %{_bindir}/pyp-3 %changelog * Mon Nov 9 2015 René Ribaud - 1.4-2 - Fix according to Julien's feedbacks (bug 1262644). * Sun Sep 13 2015 René Ribaud - 1.4-1 - Initial rpm