f71e7f
%global pylib_version 1.4.29
16bbfe
9c5eb1
Name:           pytest
4da221
Version:        2.9.2
c65fe9
Release:        1%{?dist}
9c5eb1
Summary:        Simple powerful testing with Python
9c5eb1
License:        MIT
9c5eb1
URL:            http://pytest.org
9914b0
Source0:        https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
9c5eb1
9c5eb1
BuildArch:      noarch
77ca0c
BuildRequires:  python2-devel
9c5eb1
BuildRequires:  python3-devel
c65fe9
BuildRequires:  python2-setuptools
9c5eb1
BuildRequires:  python3-setuptools
c65fe9
BuildRequires:  python2-py >= %{pylib_version}
16bbfe
BuildRequires:  python3-py >= %{pylib_version}
c65fe9
BuildRequires:  python-sphinx
c65fe9
BuildRequires:  python-docutils
3bf32d
# used by the testsuite, if present:
c65fe9
BuildRequires:  python2-pexpect
Orion Poplawski 9ebb9b
BuildRequires:  python3-pexpect
c65fe9
BuildRequires:  python-mock
3bf32d
BuildRequires:  python3-mock
c65fe9
BuildRequires:  python-twisted-core
c65fe9
#BuildRequires: python3-twisted-core
3bf32d
9c5eb1
%description
9c5eb1
py.test provides simple, yet powerful testing for Python.
9c5eb1
9c5eb1
c65fe9
%package -n python2-%{name}
c65fe9
Summary:        Simple powerful testing with Python
c65fe9
Requires:       python2-setuptools
c65fe9
Requires:       python2-py >= %{pylib_version}
c65fe9
%{?python_provide:%python_provide python2-%{name}}
c65fe9
# the python2 package was named pytest up to 2.8.7-2
c65fe9
Provides:       %{name} = %{version}-%{release}
c65fe9
Obsoletes:      %{name} < 2.8.7-3
c65fe9
c65fe9
%description -n python2-%{name}
c65fe9
py.test provides simple, yet powerful testing for Python.
c65fe9
c65fe9
c65fe9
%package -n python3-%{name}
9c5eb1
Summary:        Simple powerful testing with Python
9c5eb1
Group:          Development/Languages
5cb33d
Requires:       python3-setuptools
16bbfe
Requires:       python3-py >= %{pylib_version}
Orion Poplawski 13edb5
%{?python_provide:%python_provide python3-%{name}}
9c5eb1
c65fe9
%description -n python3-%{name}
9c5eb1
py.test provides simple, yet powerful testing for Python.
9c5eb1
9c5eb1
9c5eb1
%prep
77ca0c
%setup -qc -n %{name}-%{version}
77ca0c
mv %{name}-%{version} python2
77ca0c
cp -a python2 python3
9c5eb1
9c5eb1
9c5eb1
%build
77ca0c
pushd python2
Orion Poplawski fffc79
%{py2_build}
e5fa0a
for l in doc/* ; do
e5fa0a
  make -C $l html PYTHONPATH=$(pwd)
e5fa0a
done
c65fe9
for f in README CHANGELOG CONTRIBUTING ; do
c65fe9
  rst2html ${f}.rst > ${f}.html
e5fa0a
done
77ca0c
popd
9c5eb1
77ca0c
pushd python3
Orion Poplawski fffc79
%{py3_build}
c65fe9
for l in doc/* ; do
c65fe9
  make -C $l html PYTHONPATH=$(pwd)
c65fe9
done
c65fe9
for f in README CHANGELOG CONTRIBUTING ; do
c65fe9
  rst2html ${f}.rst > ${f}.html
c65fe9
done
9c5eb1
popd
9c5eb1
9c5eb1
9c5eb1
%install
77ca0c
pushd python2
Orion Poplawski fffc79
%{py2_install}
fb0938
ln -snf py.test-%{python2_version} %{buildroot}%{_bindir}/py.test-2
9c5eb1
77ca0c
mkdir -p _htmldocs/html
77ca0c
for l in doc/* ; do
77ca0c
  # remove hidden file
77ca0c
  rm ${l}/_build/html/.buildinfo
77ca0c
  mv ${l}/_build/html _htmldocs/html/${l##doc/}
77ca0c
done
77ca0c
popd
77ca0c
77ca0c
pushd python3
Orion Poplawski fffc79
%{py3_install}
fb0938
ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3
9c5eb1
c65fe9
mkdir -p _htmldocs/html
c65fe9
for l in doc/* ; do
c65fe9
  # remove hidden file
c65fe9
  rm ${l}/_build/html/.buildinfo
c65fe9
  mv ${l}/_build/html _htmldocs/html/${l##doc/}
c65fe9
done
c65fe9
popd
c65fe9
9c5eb1
# remove shebangs from all scripts
c65fe9
find %{buildroot}%{python2_sitelib} \
c65fe9
     %{buildroot}%{python3_sitelib} \
c65fe9
     -name '*.py' \
9c5eb1
     -exec sed -i -e '1{/^#!/d}' {} \;
9c5eb1
9c5eb1
# use 2.X per default
fb0938
ln -snf py.test-%{python2_version} %{buildroot}%{_bindir}/py.test
9c5eb1
9c5eb1
9c5eb1
%check
77ca0c
pushd python2
71f464
PATH=%{buildroot}%{_bindir}:${PATH} \
77ca0c
PYTHONPATH=%{buildroot}%{python2_sitelib} \
f71e7f
  %{buildroot}%{_bindir}/py.test-%{python2_version} -r s testing
77ca0c
popd
77ca0c
77ca0c
pushd python3
71f464
PATH=%{buildroot}%{_bindir}:${PATH} \
9c5eb1
PYTHONPATH=%{buildroot}%{python3_sitelib} \
f71e7f
  %{buildroot}%{_bindir}/py.test-%{python3_version} -r s testing
9c5eb1
popd
9c5eb1
9c5eb1
c65fe9
%files -n python2-%{name}
c65fe9
%doc python2/CHANGELOG.html
77ca0c
%doc python2/README.html
c65fe9
%doc python2/CONTRIBUTING.html
77ca0c
%doc python2/_htmldocs/html
77ca0c
%license python2/LICENSE
9c5eb1
%{_bindir}/py.test
fb0938
%{_bindir}/py.test-2
f71e7f
%{_bindir}/py.test-%{python2_version}
77ca0c
%{python2_sitelib}/*
9c5eb1
9c5eb1
c65fe9
%files -n python3-%{name}
c65fe9
%doc python3/CHANGELOG.html
c65fe9
%doc python3/README.html
c65fe9
%doc python3/CONTRIBUTING.html
c65fe9
%doc python3/_htmldocs/html
77ca0c
%license python3/LICENSE
fb0938
%{_bindir}/py.test-3
f71e7f
%{_bindir}/py.test-%{python3_version}
c65fe9
%{python3_sitelib}/*
c65fe9
%exclude %dir %{python3_sitelib}/__pycache__
9c5eb1
9c5eb1
9c5eb1
%changelog
4da221
* Fri Jun  3 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.2-1
4da221
- Update to 2.9.2.
4da221
4986f1
* Tue May 31 2016 Nils Philippsen <nils@redhat.com>
4986f1
- fix source URL
4986f1
c65fe9
* Sat Apr  9 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.1-1
c65fe9
- Update to 2.9.1.
c65fe9
- Packaging updates.
c65fe9
Orion Poplawski fffc79
* Tue Feb 2 2016 Orion Poplawski <orion@cora.nwra.com> - 2.8.7-2
Orion Poplawski fffc79
- Use new python macros
Orion Poplawski fffc79
- Fix python3 package file ownership
Orion Poplawski fffc79
add628
* Sun Jan 24 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.7-1
add628
- Update to 2.8.7.
add628
fa2bfb
* Fri Jan 22 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.6-1
fa2bfb
- Update to 2.8.6.
fa2bfb
Orion Poplawski ff2e49
* Wed Dec 30 2015 Orion Poplawski <orion@cora.nwra.com> - 2.8.5-1
Orion Poplawski ff2e49
- Update to 2.8.5
Orion Poplawski ff2e49
Orion Poplawski 9ebb9b
* Wed Dec 30 2015 Orion Poplawski <orion@cora.nwra.com> - 2.8.2-3
Orion Poplawski 9ebb9b
- Re-enable pexpect in tests
Orion Poplawski 9ebb9b
81d05d
* Wed Nov 11 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.2-2
81d05d
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
81d05d
c94cbd
* Tue Oct 20 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.2-1
c94cbd
- Update to 2.8.2.
c94cbd
Robert Kuska e037be
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.7.3-2
Robert Kuska e037be
- Rebuilt for Python3.5 rebuild
Robert Kuska e037be
fb0938
* Thu Sep 17 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.3-1
fb0938
- Update to 2.7.3.
fb0938
- Provide additional symlinks to the pytest executables (rhbz#1249891).
fb0938
Orion Poplawski 13edb5
* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 2.7.2-2
Orion Poplawski 13edb5
- Provide python2-pytest, use python_provide macro
Orion Poplawski 13edb5
f71e7f
* Thu Jun 25 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.2-1
f71e7f
- Update to 2.7.2.
f71e7f
- Small fixes.
f71e7f
2cf870
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
2cf870
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2cf870
68f6d0
* Sat May 23 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.1-1
68f6d0
- Update to 2.7.1.
68f6d0
77ca0c
* Mon Apr 20 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.0-1
77ca0c
- Update to 2.7.0.
77ca0c
- Apply updated Python packaging guidelines.
77ca0c
- Mark LICENSE with %%license.
77ca0c
4ac764
* Tue Dec  2 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.4-1
4ac764
- Update to 2.6.4.
4ac764
d55e5c
* Sat Oct 11 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.3-1
d55e5c
- Update to 2.6.3.
d55e5c
ef0eb6
* Fri Aug  8 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.1-1
ef0eb6
- Update to 2.6.1.
ef0eb6
d49790
* Fri Aug  1 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.0-1
d49790
- Update to 2.6.0.
d49790
f2bce5
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-3
f2bce5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f2bce5
5e35a1
* Fri May 09 2014 Dennis Gilmore <dennis@ausil.us> - 2.5.2-2
5e35a1
- Redbuild for python 3.4
5e35a1
48eb4c
* Fri Apr 18 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
48eb4c
- Update to 2.5.2.
48eb4c
f742f4
* Mon Oct  7 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.2-2
f742f4
- Only run tests from the 'testing' subdir in %%check.
f742f4
71f464
* Sat Oct  5 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.2-1
71f464
- Update to 2.4.2.
71f464
- Add buildroot's bindir to PATH while running the testsuite.
71f464
d9b4ae
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.5-4
d9b4ae
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
d9b4ae
ea6a47
* Thu Jun 13 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-3
ea6a47
- Disable tests using pexpect for now, fails on F19.
ea6a47
5c1363
* Wed Jun 12 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-2
0560a6
- Use python-sphinx for rhel > 6 (rhbz#973318).
5c1363
- Update BR to use python-pexpect instead of pexpect.
5c1363
6e12e2
* Sat May 25 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-1
6e12e2
- Update to 2.3.5.
0b8017
- Docutils needed now to build README.html.
3bf32d
- Add some BR optionally used by the testsuite.
6e12e2
73bee3
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-2
73bee3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
73bee3
bb07fc
* Fri Nov 23 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.4-1
bb07fc
- Update to 2.3.4.
bb07fc
388c87
* Sun Oct 28 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.2-1
388c87
- Update to 2.3.2.
388c87
e5fa0a
* Sun Oct 21 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
e5fa0a
- Update to 2.3.1.
e5fa0a
- Re-enable some tests, ignore others.
e5fa0a
- Docs are available in English and Japanese now.
e5fa0a
8205b3
* Thu Oct 11 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.4-4
8205b3
- Add conditional for sphinx on rhel.
8205b3
- Remove rhel logic from with_python3 conditional.
8328a8
- Disable failing tests for Python3.
8205b3
d1e937
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.4-3
d1e937
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
d1e937
b3fe38
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.4-2
b3fe38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b3fe38
16bbfe
* Wed Jun  6 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.4-1
16bbfe
- Update to 2.2.4.
16bbfe
f90839
* Wed Feb  8 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.3-1
f90839
- Update to 2.2.3.
f90839
ea97d0
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
ea97d0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
ea97d0
281bb3
* Sat Dec 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
281bb3
- Update to 2.2.1.
281bb3
96521b
* Tue Dec 13 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.0-1
96521b
- Update to 2.2.0.
96521b
6c1078
* Wed Oct 26 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.3-1
6c1078
- Update to 2.1.3.
6c1078
6c1078
* Tue Sep 27 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.2-1
6c1078
- Update to 2.1.2.
6c1078
5cb33d
* Sat Sep  3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-2
5cb33d
- Fix: python3 dependencies.
5cb33d
fb76f7
* Sun Aug 28 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
fb76f7
- Update to 2.1.1.
fb76f7
cc8ea7
* Thu Aug 11 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.0-2
cc8ea7
- Update Requires and BuildRequires tags.
cc8ea7
9c5eb1
* Tue Aug  9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.0-1
9c5eb1
- Update to 2.1.0.
9c5eb1
9c5eb1
* Mon May 30 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.3-1
9c5eb1
- Update to 2.0.3.
9c5eb1
9c5eb1
* Thu Mar 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.2-1
9c5eb1
- Update to 2.0.2.
9c5eb1
9c5eb1
* Sun Jan 16 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.0-1
9c5eb1
- New package.