b6735cb
%global pypi_name plumbum
3104abd
%global with_python3 1
b6735cb
b6735cb
Name:           python-%{pypi_name}
22858e5
Version:        1.1.0
4188425
Release:        2%{?dist}
b6735cb
Summary:        Shell combinators library
b6735cb
b6735cb
License:        MIT
b6735cb
URL:            https://github.com/tomerfiliba/plumbum
67ad120
Source0:        http://pypi.python.org/packages/source/p/plumbum/plumbum-%{version}.tar.gz
22858e5
# https://github.com/tomerfiliba/plumbum/pull/55
22858e5
Patch0:         plumbum-1.1.0-fix-print-for-p3.patch
4188425
Patch1:         plumbum-1.1.0-add-__path__-to-LocalModule.patch
b6735cb
b6735cb
BuildArch:      noarch
b6735cb
BuildRequires:  python-devel
b6735cb
Requires:       python-six
b6735cb
3104abd
%if 0%{?with_python3}
3104abd
BuildRequires:  python3-devel
3104abd
%endif # if with_python3
3104abd
b6735cb
%description
b6735cb
Ever wished the wrist-handiness of shell scripts be put into a real programming
b6735cb
language? Say hello to Plumbum Shell Combinators. Plumbum (Latin for lead,
b6735cb
which was used to create pipes back in the day) is a small yet feature-rich
b6735cb
library for shell script-like programs in Python. The motto of the library is
b6735cb
"Never write shell scripts again", and thus it attempts to mimic the shell
b6735cb
syntax ("shell combinators") where it makes sense, while keeping it all
b6735cb
pythonic and cross-platform.
b6735cb
3104abd
%if 0%{?with_python3}
3104abd
%package -n python3-%{pypi_name}
3104abd
Summary:        Shell combinators library
3104abd
Requires:       python3-six
3104abd
3104abd
%description -n python3-%{pypi_name}
3104abd
Ever wished the wrist-handiness of shell scripts be put into a real programming
3104abd
language? Say hello to Plumbum Shell Combinators. Plumbum (Latin for lead,
3104abd
which was used to create pipes back in the day) is a small yet feature-rich
3104abd
library for shell script-like programs in Python. The motto of the library is
3104abd
"Never write shell scripts again", and thus it attempts to mimic the shell
3104abd
syntax ("shell combinators") where it makes sense, while keeping it all
3104abd
pythonic and cross-platform.
3104abd
%endif # with_python3
3104abd
b6735cb
%prep
b6735cb
%setup -q -n %{pypi_name}-%{version}
b6735cb
rm -rf %{pypi_name}.egg-info
b6735cb
22858e5
%patch0 -p1
4188425
%patch1 -p1
22858e5
3104abd
%if 0%{?with_python3}
3104abd
rm -rf %{py3dir}
3104abd
cp -a . %{py3dir}
3104abd
%endif # with_python3
3104abd
b6735cb
%build
b6735cb
%{__python} setup.py build
b6735cb
3104abd
%if 0%{?with_python3}
3104abd
pushd %{py3dir}
3104abd
%{__python3} setup.py build
3104abd
popd
3104abd
%endif # with_python3
b6735cb
b6735cb
%install
3104abd
%if 0%{?with_python3}
3104abd
pushd %{py3dir}
3104abd
%{__python3} setup.py install --skip-build --root %{buildroot}
3104abd
popd
3104abd
%endif # with_python3
3104abd
b6735cb
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
b6735cb
b6735cb
b6735cb
%files
b6735cb
%doc LICENSE README.rst
b6735cb
%{python_sitelib}/%{pypi_name}
b6735cb
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
b6735cb
3104abd
%if 0%{?with_python3}
3104abd
%files -n python3-%{pypi_name}
3104abd
%doc LICENSE README.rst
3104abd
%{python3_sitelib}/%{pypi_name}
3104abd
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
3104abd
%endif # with_python3
3104abd
b6735cb
b6735cb
%changelog
4188425
* Fri Feb 08 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.0-2
4188425
- Patch the Python 3.3 module subclass error.
4188425
22858e5
* Fri Feb 08 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.1.0-1
22858e5
- Update to 1.1.0.
22858e5
3104abd
* Fri Feb 08 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0.1-2
3104abd
- Introduce python3 subpackage.
3104abd
67ad120
* Mon Nov 05 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 1.0.1-1
67ad120
- Update to 1.0.1.
67ad120
44877e0
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
44877e0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
44877e0
b6735cb
* Mon May 14 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.9.0-1
b6735cb
- Initial package.