%global with_python3 1
Name: python-scripttest
Version: 1.3.0
Release: 3%{?dist}
Summary: Helper to test command-line scripts
Group: Development/Languages
License: MIT
URL: http://pypi.python.org/pypi/ScriptTest/
Source0: https://github.com/pypa/scripttest/archive/1.3.0.tar.gz
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: python-sphinx
BuildRequires: python-nose
BuildRequires: pytest
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-sphinx
BuildRequires: python3-nose
BuildRequires: python3-pytest
%endif
%description
ScriptTest is a library to help you test your interactive
command-line applications.
With it you can easily run the command (in a subprocess) and see
the output (stdout, stderr) and any file modifications.
%if 0%{?with_python3}
%package -n python3-scripttest
Summary: Helper to test command-line scripts
%description -n python3-scripttest
ScriptTest is a library to help you test your interactive
command-line applications.
With it you can easily run the command (in a subprocess) and see
the output (stdout, stderr) and any file modifications.
%endif # with_python3
%prep
%setup -q -n scripttest-%{version}
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%{__python2} setup.py build
sphinx-build -b html docs/ docs/html
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
sphinx-build -b html docs/ docs/html
popd
%endif # with_python3
%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%endif # with_python3
%{__python2} setup.py install --skip-build --root %{buildroot}
%clean
rm -rf %{buildroot}
%check
%{__python} setup.py test
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif # with_python3
%files
%doc docs/html
%doc docs/license.rst
%{python2_sitelib}/scripttest.py
%{python2_sitelib}/scripttest.py[co]
%{python2_sitelib}/scripttest*.egg-info
%if 0%{?with_python3}
%files -n python3-scripttest
%doc docs/html
%doc docs/license.rst
%{python3_sitelib}/scripttest.py
%{python3_sitelib}/__pycache__/scripttest.cpython-??.py[co]
%{python3_sitelib}/scripttest*.egg-info
%endif # with_python3
%changelog
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue Dec 02 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.3.0-2
- Add python3 subpackage
* Wed Jul 02 2014 Matej Stuchlik <mstuchli@redhat.com> - 1.3.0-1
- Update to 1.3.0
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.4-10
- Replace python-setuptools-devel BR with python-setuptools
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Sat Jul 31 2010 Orcan Ogetbil <oget[dot]fedora[at]gmail[dot]com> - 1.0.4-3
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
* Wed Jul 21 2010 Martin Bacovsky <mbacovsk@redhat.com> - 1.0.4-2
- generated docs moved to html subdir
- license file added to docs
* Tue Jul 13 2010 Martin Bacovsky <mbacovsk@redhat.com> - 1.0.4-1
- Initial package
- fixed issue preventing build and usage on ext4.