pytest/pytest.spec

400 lines
12 KiB
RPMSpec
Raw Normal View History

2015-06-25 10:01:50 +00:00
%global pylib_version 1.4.29
2012-06-09 11:41:35 +00:00
2011-08-11 08:49:09 +00:00
Name: pytest
2017-07-30 10:59:53 +00:00
Version: 3.1.3
Release: 1%{?dist}
2011-08-11 08:49:09 +00:00
Summary: Simple powerful testing with Python
License: MIT
URL: http://pytest.org
2016-05-31 10:17:49 +00:00
Source0: https://files.pythonhosted.org/packages/source/p/%{name}/%{name}-%{version}.tar.gz
2011-08-11 08:49:09 +00:00
2016-12-13 13:18:36 +00:00
# The test in this specfile use pytest-timeout
# When building pytest for the first time with new Python version
# that is not possible as it depends on pytest
%bcond_without timeout
2016-12-13 13:18:36 +00:00
2011-08-11 08:49:09 +00:00
BuildArch: noarch
BuildRequires: python2-devel
2011-08-11 08:49:09 +00:00
BuildRequires: python3-devel
2016-04-09 23:49:26 +00:00
BuildRequires: python2-setuptools
2011-08-11 08:49:09 +00:00
BuildRequires: python3-setuptools
2017-06-03 10:27:45 +00:00
BuildRequires: python2-setuptools_scm
BuildRequires: python3-setuptools_scm
2016-04-09 23:49:26 +00:00
BuildRequires: python2-py >= %{pylib_version}
2012-06-09 11:41:35 +00:00
BuildRequires: python3-py >= %{pylib_version}
2017-07-30 10:59:53 +00:00
BuildRequires: %{_bindir}/sphinx-build
BuildRequires: %{_bindir}/rst2html
BuildRequires: python2-hypothesis
BuildRequires: python3-hypothesis
2016-12-13 13:18:36 +00:00
%if %{with timeout}
BuildRequires: python2-pytest-timeout
BuildRequires: python3-pytest-timeout
2016-12-13 13:18:36 +00:00
%endif
#BuildRequires: python2-pexpect
#BuildRequires: python3-pexpect
BuildRequires: python2-mock
BuildRequires: python3-mock
BuildRequires: python2-twisted
2017-07-30 10:59:53 +00:00
BuildRequires: python3-twisted
BuildRequires: python2-jinja2
BuildRequires: python3-jinja2
BuildRequires: python2-nose
BuildRequires: python3-nose
BuildRequires: python2-argcomplete
BuildRequires: python3-argcomplete
BuildRequires: python2-decorator
BuildRequires: python3-decorator
2011-08-11 08:49:09 +00:00
%description
py.test provides simple, yet powerful testing for Python.
2016-04-09 23:49:26 +00:00
%package -n python2-%{name}
Summary: Simple powerful testing with Python
Requires: python2-setuptools
Requires: python2-py >= %{pylib_version}
%{?python_provide:%python_provide python2-%{name}}
# the python2 package was named pytest up to 2.8.7-2
Provides: %{name} = %{version}-%{release}
Obsoletes: %{name} < 2.8.7-3
%description -n python2-%{name}
py.test provides simple, yet powerful testing for Python.
%package -n python3-%{name}
2011-08-11 08:49:09 +00:00
Summary: Simple powerful testing with Python
2011-09-03 13:38:10 +00:00
Requires: python3-setuptools
2012-06-09 11:41:35 +00:00
Requires: python3-py >= %{pylib_version}
%{?python_provide:%python_provide python3-%{name}}
2011-08-11 08:49:09 +00:00
2016-04-09 23:49:26 +00:00
%description -n python3-%{name}
2011-08-11 08:49:09 +00:00
py.test provides simple, yet powerful testing for Python.
%prep
%setup -qc -n %{name}-%{version}
mv %{name}-%{version} python2
cp -a python2 python3
2011-08-11 08:49:09 +00:00
%build
pushd python2
%{py2_build}
2012-10-21 16:51:52 +00:00
for l in doc/* ; do
make -C $l html PYTHONPATH=$(pwd)
done
2016-04-09 23:49:26 +00:00
for f in README CHANGELOG CONTRIBUTING ; do
rst2html ${f}.rst > ${f}.html
2012-10-21 16:51:52 +00:00
done
popd
2011-08-11 08:49:09 +00:00
pushd python3
%{py3_build}
2016-04-09 23:49:26 +00:00
for l in doc/* ; do
make -C $l html PYTHONPATH=$(pwd)
done
for f in README CHANGELOG CONTRIBUTING ; do
rst2html ${f}.rst > ${f}.html
done
2011-08-11 08:49:09 +00:00
popd
%install
pushd python2
%{py2_install}
mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python2_version}
ln -snf pytest-%{python2_version} %{buildroot}%{_bindir}/pytest-2
mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python2_version}
ln -snf py.test-%{python2_version} %{buildroot}%{_bindir}/py.test-2
2011-08-11 08:49:09 +00:00
mkdir -p _htmldocs/html
for l in doc/* ; do
# remove hidden file
rm ${l}/_build/html/.buildinfo
mv ${l}/_build/html _htmldocs/html/${l##doc/}
done
popd
pushd python3
%{py3_install}
mv %{buildroot}%{_bindir}/pytest %{buildroot}%{_bindir}/pytest-%{python3_version}
ln -snf pytest-%{python3_version} %{buildroot}%{_bindir}/pytest-3
mv %{buildroot}%{_bindir}/py.test %{buildroot}%{_bindir}/py.test-%{python3_version}
ln -snf py.test-%{python3_version} %{buildroot}%{_bindir}/py.test-3
2011-08-11 08:49:09 +00:00
2016-04-09 23:49:26 +00:00
mkdir -p _htmldocs/html
for l in doc/* ; do
# remove hidden file
rm ${l}/_build/html/.buildinfo
mv ${l}/_build/html _htmldocs/html/${l##doc/}
done
popd
2011-08-11 08:49:09 +00:00
# remove shebangs from all scripts
2016-04-09 23:49:26 +00:00
find %{buildroot}%{python2_sitelib} \
%{buildroot}%{python3_sitelib} \
-name '*.py' \
2011-08-11 08:49:09 +00:00
-exec sed -i -e '1{/^#!/d}' {} \;
# use 2.X per default
ln -snf pytest-%{python2_version} %{buildroot}%{_bindir}/pytest
ln -snf py.test-%{python2_version} %{buildroot}%{_bindir}/py.test
2011-08-11 08:49:09 +00:00
%check
pushd python2
PATH=%{buildroot}%{_bindir}:${PATH} \
PYTHONPATH=%{buildroot}%{python2_sitelib} \
2016-12-13 13:18:36 +00:00
%{buildroot}%{_bindir}/pytest-%{python2_version} -r s testing \
%if %{with timeout}
--timeout=20
%endif
popd
pushd python3
PATH=%{buildroot}%{_bindir}:${PATH} \
2011-08-11 08:49:09 +00:00
PYTHONPATH=%{buildroot}%{python3_sitelib} \
2016-12-13 13:18:36 +00:00
%{buildroot}%{_bindir}/pytest-%{python3_version} -r s testing \
%if %{with timeout}
--timeout=20
%endif
2011-08-11 08:49:09 +00:00
popd
2016-04-09 23:49:26 +00:00
%files -n python2-%{name}
%doc python2/CHANGELOG.html
%doc python2/README.html
2016-04-09 23:49:26 +00:00
%doc python2/CONTRIBUTING.html
%doc python2/_htmldocs/html
%license python2/LICENSE
%{_bindir}/pytest
%{_bindir}/pytest-2
%{_bindir}/pytest-%{python2_version}
2011-08-11 08:49:09 +00:00
%{_bindir}/py.test
%{_bindir}/py.test-2
2015-06-25 10:01:50 +00:00
%{_bindir}/py.test-%{python2_version}
%{python2_sitelib}/*
2011-08-11 08:49:09 +00:00
2016-04-09 23:49:26 +00:00
%files -n python3-%{name}
%doc python3/CHANGELOG.html
%doc python3/README.html
%doc python3/CONTRIBUTING.html
%doc python3/_htmldocs/html
%license python3/LICENSE
%{_bindir}/pytest-3
%{_bindir}/pytest-%{python3_version}
%{_bindir}/py.test-3
2015-06-25 10:01:50 +00:00
%{_bindir}/py.test-%{python3_version}
2016-04-09 23:49:26 +00:00
%{python3_sitelib}/*
%exclude %dir %{python3_sitelib}/__pycache__
2011-08-11 08:49:09 +00:00
%changelog
2017-07-30 10:59:53 +00:00
* Sun Jul 30 2017 Thomas Moschny <thomas.moschny@gmx.de> - 3.1.3-1
- Update to 3.1.3.
- Update BRs.
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
2017-06-03 09:29:46 +00:00
* Sat Jun 3 2017 Thomas Moschny <thomas.moschny@gmx.de> - 3.1.1-1
- Update to 3.1.1.
2017-06-03 10:27:45 +00:00
- Add BR on setuptools_scm.
2017-06-03 09:29:46 +00:00
2017-03-15 22:07:20 +00:00
* Wed Mar 15 2017 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.7-1
- Update to 3.0.7.
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Sun Jan 29 2017 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.6-1
- Update to 3.0.6.
- Drop patch applied upstream.
2016-12-13 13:18:36 +00:00
* Tue Dec 13 2016 Miro Hrončok <mhroncok@redhat.com> - 3.0.5-2
- Rebuild for Python 3.6
2016-12-06 10:00:12 +00:00
* Tue Dec 6 2016 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.5-1
- Update to 3.0.5.
2016-11-28 17:45:13 +00:00
* Mon Nov 28 2016 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.4-1
- Update to 3.0.4.
* Fri Sep 30 2016 Thomas Moschny <thomas.moschny@gmx.de> - 3.0.3-1
- Update to 3.0.3.
- Update requirements.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.2-2
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
2016-06-03 18:01:56 +00:00
* Fri Jun 3 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.2-1
- Update to 2.9.2.
2016-05-31 10:06:41 +00:00
* Tue May 31 2016 Nils Philippsen <nils@redhat.com>
- fix source URL
2016-04-09 23:49:26 +00:00
* Sat Apr 9 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.9.1-1
- Update to 2.9.1.
- Packaging updates.
* Tue Feb 2 2016 Orion Poplawski <orion@cora.nwra.com> - 2.8.7-2
- Use new python macros
- Fix python3 package file ownership
2016-01-24 23:58:55 +00:00
* Sun Jan 24 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.7-1
- Update to 2.8.7.
2016-01-22 21:46:20 +00:00
* Fri Jan 22 2016 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.6-1
- Update to 2.8.6.
2015-12-30 21:33:58 +00:00
* Wed Dec 30 2015 Orion Poplawski <orion@cora.nwra.com> - 2.8.5-1
- Update to 2.8.5
2015-12-30 21:29:36 +00:00
* Wed Dec 30 2015 Orion Poplawski <orion@cora.nwra.com> - 2.8.2-3
- Re-enable pexpect in tests
* Wed Nov 11 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8.2-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
2015-10-20 07:14:24 +00:00
* Tue Oct 20 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.8.2-1
- Update to 2.8.2.
2015-10-12 11:55:09 +00:00
* Mon Oct 12 2015 Robert Kuska <rkuska@redhat.com> - 2.7.3-2
- Rebuilt for Python3.5 rebuild
* Thu Sep 17 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.3-1
- Update to 2.7.3.
- Provide additional symlinks to the pytest executables (rhbz#1249891).
* Mon Sep 14 2015 Orion Poplawski <orion@cora.nwra.com> - 2.7.2-2
- Provide python2-pytest, use python_provide macro
2015-06-25 10:01:50 +00:00
* Thu Jun 25 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.2-1
- Update to 2.7.2.
- Small fixes.
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2015-05-23 14:55:09 +00:00
* Sat May 23 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.1-1
- Update to 2.7.1.
* Mon Apr 20 2015 Thomas Moschny <thomas.moschny@gmx.de> - 2.7.0-1
- Update to 2.7.0.
- Apply updated Python packaging guidelines.
- Mark LICENSE with %%license.
2014-12-02 19:28:09 +00:00
* Tue Dec 2 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.4-1
- Update to 2.6.4.
2014-10-11 12:54:36 +00:00
* Sat Oct 11 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.3-1
- Update to 2.6.3.
2014-08-08 13:27:21 +00:00
* Fri Aug 8 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.1-1
- Update to 2.6.1.
2014-08-01 17:06:52 +00:00
* Fri Aug 1 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.6.0-1
- Update to 2.6.0.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.5.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2014-05-09 20:34:50 +00:00
* Fri May 09 2014 Dennis Gilmore <dennis@ausil.us> - 2.5.2-2
- Redbuild for python 3.4
2014-04-18 14:10:38 +00:00
* Fri Apr 18 2014 Thomas Moschny <thomas.moschny@gmx.de> - 2.5.2-1
- Update to 2.5.2.
* Mon Oct 7 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.2-2
- Only run tests from the 'testing' subdir in %%check.
* Sat Oct 5 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.4.2-1
- Update to 2.4.2.
- Add buildroot's bindir to PATH while running the testsuite.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.5-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Jun 13 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-3
- Disable tests using pexpect for now, fails on F19.
* Wed Jun 12 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-2
- Use python-sphinx for rhel > 6 (rhbz#973318).
- Update BR to use python-pexpect instead of pexpect.
2013-05-25 13:00:09 +00:00
* Sat May 25 2013 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.5-1
- Update to 2.3.5.
- Docutils needed now to build README.html.
- Add some BR optionally used by the testsuite.
2013-05-25 13:00:09 +00:00
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2012-11-24 15:25:18 +00:00
* Fri Nov 23 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.4-1
- Update to 2.3.4.
2012-10-28 09:18:10 +00:00
* Sun Oct 28 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.2-1
- Update to 2.3.2.
2012-10-21 16:51:52 +00:00
* Sun Oct 21 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.3.1-1
- Update to 2.3.1.
- Re-enable some tests, ignore others.
- Docs are available in English and Japanese now.
* Thu Oct 11 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.4-4
- Add conditional for sphinx on rhel.
- Remove rhel logic from with_python3 conditional.
2012-10-12 18:08:44 +00:00
- Disable failing tests for Python3.
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.4-3
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2012-06-09 11:41:35 +00:00
* Wed Jun 6 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.4-1
- Update to 2.2.4.
2012-02-08 18:26:49 +00:00
* Wed Feb 8 2012 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.3-1
- Update to 2.2.3.
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2011-12-17 13:55:31 +00:00
* Sat Dec 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.1-1
- Update to 2.2.1.
2011-12-13 18:36:13 +00:00
* Tue Dec 13 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.2.0-1
- Update to 2.2.0.
2011-10-26 18:26:03 +00:00
* Wed Oct 26 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.3-1
- Update to 2.1.3.
* Tue Sep 27 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.2-1
- Update to 2.1.2.
2011-09-03 13:38:10 +00:00
* Sat Sep 3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-2
- Fix: python3 dependencies.
2011-08-30 20:01:11 +00:00
* Sun Aug 28 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.1-1
- Update to 2.1.1.
* Thu Aug 11 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.0-2
- Update Requires and BuildRequires tags.
2011-08-11 08:49:09 +00:00
* Tue Aug 9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.1.0-1
- Update to 2.1.0.
* Mon May 30 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.3-1
- Update to 2.0.3.
* Thu Mar 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.2-1
- Update to 2.0.2.
* Sun Jan 16 2011 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.0-1
- New package.