# Created by pyp2rpm-0.5.1
%global pypi_name spec2scl
Name: %{pypi_name}
Version: 0.3.4
Release: 1%{?dist}
Summary: Convert RPM specfiles to be SCL ready
License: MIT
URL: https://bitbucket.org/bkabrda/spec2scl/
Source0: http://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
Patch0: spec2scl-remove-setup-requires-on-el-6.patch
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
%if 0%{?fedora}
BuildRequires: python-flexmock
BuildRequires: pytest
%endif
Requires: python-argparse
Requires: python-setuptools
%description
spec2scl is a tool to convert RPM specfiles to SCL-style specfiles.
%prep
%setup -q -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
%patch0 -p0
%build
%{__python} setup.py build
%install
%{__python} setup.py install --skip-build --root %{buildroot}
%check
%if 0%{?fedora}
# remove erroneously packaged pycache
rm -rf tests/__pycache__
PYTHONPATH=$(pwd) py.test
%endif
%files
%doc README.rst LICENSE
%{_bindir}/%{pypi_name}
%{python_sitelib}/%{pypi_name}
%{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
%changelog
* Mon Jan 07 2013 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.4-1
- Update to 0.3.4.
* Wed Dec 19 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.3-1
- Update to 0.3.3.
* Thu Nov 08 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.2-1
- Update to 0.3.2.
- Add the missing Requires: python-setuptools.
* Fri Sep 21 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.1-2
- Disable tests on el6 (no pytest).
* Tue Sep 18 2012 Bohuslav Kabrda <bkabrda@redhat.com> - 0.3.1-1
- Initial package.