1 |
joequant |
329025 |
# Created by pyp2rpm-1.0.0 |
2 |
|
|
%global pypi_name pytest |
3 |
|
|
|
4 |
|
|
Name: python-test |
5 |
bcornec |
674522 |
Version: 2.6.2 |
6 |
|
|
Release: %mkrel 1 |
7 |
joequant |
329025 |
Group: Development/Python |
8 |
|
|
Summary: py.test: simple powerful testing with Python |
9 |
|
|
|
10 |
|
|
License: MIT |
11 |
fwang |
440584 |
URL: http://pytest.org |
12 |
|
|
Source0: http://pypi.python.org/packages/source/p/pytest/pytest-%{version}.tar.gz |
13 |
joequant |
329025 |
BuildArch: noarch |
14 |
|
|
|
15 |
|
|
BuildRequires: python-devel |
16 |
|
|
BuildRequires: python-sphinx |
17 |
fwang |
440979 |
BuildRequires: python-setuptools |
18 |
fwang |
440584 |
Requires: python-py >= 1.4.13 |
19 |
joequant |
329025 |
|
20 |
|
|
%description |
21 |
|
|
The `py.test`` testing tool makes it easy to write small tests, yet |
22 |
|
|
scales to support complex functional testing. It provides |
23 |
|
|
|
24 |
|
|
- auto-discovery of test modules and functions, |
25 |
|
|
- detailed info on failing `assert statements |
26 |
|
|
|
27 |
fwang |
440584 |
%package -n python3-test |
28 |
|
|
Summary: %{summary} / Python 3 library |
29 |
|
|
BuildRequires: python3-devel |
30 |
|
|
BuildRequires: python3-setuptools |
31 |
|
|
Requires: python3-py >= 1.4.13 |
32 |
|
|
|
33 |
|
|
%description -n python3-test |
34 |
|
|
The `py.test`` testing tool makes it easy to write small tests, yet |
35 |
|
|
scales to support complex functional testing. It provides |
36 |
|
|
|
37 |
|
|
- auto-discovery of test modules and functions, |
38 |
|
|
- detailed info on failing `assert statements |
39 |
|
|
|
40 |
joequant |
329025 |
%prep |
41 |
|
|
%setup -q -n %{pypi_name}-%{version} |
42 |
|
|
# Remove bundled egg-info |
43 |
|
|
rm -rf %{pypi_name}.egg-info |
44 |
|
|
|
45 |
|
|
# generate html docs |
46 |
|
|
sphinx-build doc/en html |
47 |
|
|
# remove the sphinx-build leftovers |
48 |
|
|
rm -rf html/.{doctrees,buildinfo} |
49 |
|
|
|
50 |
fwang |
440584 |
cd .. |
51 |
|
|
cp -r %{pypi_name}-%{version} python3 |
52 |
|
|
cd - |
53 |
joequant |
329025 |
|
54 |
|
|
%build |
55 |
|
|
%{__python} setup.py build |
56 |
fwang |
440584 |
cd ../python3 |
57 |
|
|
%{__python3} setup.py build |
58 |
|
|
cd - |
59 |
joequant |
329025 |
|
60 |
|
|
%install |
61 |
fwang |
440584 |
cd ../python3 |
62 |
|
|
%{__python3} setup.py install --skip-build --root %{buildroot} |
63 |
|
|
cd - |
64 |
joequant |
329025 |
|
65 |
fwang |
440585 |
# default to python2 flavour of pytest |
66 |
fwang |
440587 |
rm -f %{buildroot}%{_bindir}/py.test |
67 |
fwang |
440585 |
%{__python} setup.py install --skip-build --root %{buildroot} |
68 |
|
|
|
69 |
joequant |
329025 |
%files |
70 |
fwang |
440585 |
%doc html README.rst LICENSE CHANGELOG |
71 |
fwang |
440586 |
%{_bindir}/py.test |
72 |
|
|
%{_bindir}/py.test-%{pyver} |
73 |
fwang |
440584 |
%{python_sitelib}/* |
74 |
|
|
|
75 |
|
|
%files -n python3-test |
76 |
fwang |
440585 |
%doc html README.rst LICENSE CHANGELOG |
77 |
fwang |
440586 |
%{_bindir}/py.test-%{py3ver} |
78 |
fwang |
440584 |
%{python3_sitelib}/* |