]> git.pld-linux.org Git - packages/python-sure.git/blame - python-sure.spec
- rebuild with python 3.8
[packages/python-sure.git] / python-sure.spec
CommitLineData
5d118f35
AM
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
e746740d 5%bcond_without python3 # CPython 3.x module
5d118f35 6
b57e1804
ER
7%define module sure
8%define egg_name sure
9%define pypi_name sure
10Summary: Utility belt for automated testing in Python for Python
5d118f35 11Name: python-%{module}
b57e1804 12Version: 1.2.24
ae9a5ca4 13Release: 4
5d118f35
AM
14License: GPL v3+
15Group: Libraries/Python
b57e1804
ER
16Source0: https://pypi.python.org/packages/source/s/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
17# Source0-md5: a396cc3c71d551bfdb9bc45363ca05da
5d118f35
AM
18URL: https://github.com/gabrielfalcao/sure
19BuildRequires: rpm-pythonprov
f1c8fb31 20BuildRequires: rpmbuild(macros) >= 1.710
5d118f35
AM
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-distribute
0b5d1b0d
MK
24BuildRequires: python-mock
25BuildRequires: python-nose
26BuildRequires: python-six
5d118f35
AM
27%endif
28%if %{with python3}
29BuildRequires: python3-devel
30BuildRequires: python3-distribute
0b5d1b0d 31BuildRequires: python3-mock
5d118f35 32BuildRequires: python3-modules
0b5d1b0d
MK
33BuildRequires: python3-nose
34BuildRequires: python3-six
5d118f35
AM
35%endif
36Requires: python-modules
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41A testing library for python with powerful and flexible assertions.
42Sure is heavily inspired by should.js.
43
44%package -n python3-%{module}
45Summary: Utility belt for automated testing in python for python
46Group: Libraries/Python
47Requires: python3-modules
48
49%description -n python3-%{module}
50A testing library for python with powerful and flexible assertions.
51Sure is heavily inspired by should.js.
52
53%prep
54%setup -q -n %{module}-%{version}
55
56%build
57%if %{with python2}
5cbb06d2 58%py_build %{?with_tests:test}
5d118f35
AM
59%endif
60
61%if %{with python3}
5cbb06d2 62%py3_build %{?with_tests:test}
5d118f35
AM
63%endif
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
68%if %{with python2}
5cbb06d2 69%py_install
5d118f35
AM
70
71%py_postclean
72%endif
73
74%if %{with python3}
5cbb06d2 75%py3_install
5d118f35
AM
76%endif
77
78%clean
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%files
83%defattr(644,root,root,755)
66ec76e3 84%doc README.md
b57e1804
ER
85%dir %{py_sitescriptdir}/%{module}
86%{py_sitescriptdir}/%{module}/*.py[co]
87%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
5d118f35
AM
88%endif
89
90%if %{with python3}
91%files -n python3-%{module}
92%defattr(644,root,root,755)
66ec76e3 93%doc README.md
5d118f35 94%{py3_sitescriptdir}/%{module}
b57e1804 95%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
5d118f35 96%endif
This page took 0.115785 seconds and 4 git commands to generate.