]> git.pld-linux.org Git - packages/python-sure.git/blame_incremental - python-sure.spec
rebuild with tests and docs
[packages/python-sure.git] / python-sure.spec
... / ...
CommitLineData
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7%define module sure
8Summary: Utility belt for automated testing in Python for Python
9Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
10Name: python-%{module}
11Version: 1.4.11
12Release: 4
13License: GPL v3+
14Group: Libraries/Python
15#Source0Download; https://pypi.org/simple/sure/
16Source0: https://files.pythonhosted.org/packages/source/s/sure/%{module}-%{version}.tar.gz
17# Source0-md5: 51f28b4ea7a6f59d1dd09f8eaaeabee7
18Patch0: %{name}-mock.patch
19URL: https://github.com/gabrielfalcao/sure
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-mock >= 2.0.0
23BuildRequires: python-nose
24BuildRequires: python-setuptools
25BuildRequires: python-six >= 1.10.0
26%endif
27%if %{with python3}
28BuildRequires: python3-devel >= 1:3.4
29BuildRequires: python3-nose
30BuildRequires: python3-setuptools
31BuildRequires: python3-six >= 1.10.0
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35Requires: python-modules >= 1:2.7
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40A testing library for Python with powerful and flexible assertions.
41Sure is heavily inspired by should.js.
42
43%description -l pl.UTF-8
44Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
45jest znacząco zainspirowany should.js.
46
47%package -n python3-%{module}
48Summary: Utility belt for automated testing in python for python
49Summary(pl.UTF-8): Narzędzia do automatycznego testowania w Pythonie
50Group: Libraries/Python
51Requires: python3-modules >= 1:3.4
52
53%description -n python3-%{module}
54A testing library for Python with powerful and flexible assertions.
55Sure is heavily inspired by should.js.
56
57%description -n python3-%{module} -l pl.UTF-8
58Biblioteka testów dla Pythona z bardzo elastycznymi asercjami. Sure
59jest znacząco zainspirowany should.js.
60
61%prep
62%setup -q -n %{module}-%{version}
63%patch0 -p1
64
65%build
66%if %{with python2}
67%py_build %{?with_tests:test}
68%endif
69
70%if %{with python3}
71%py3_build %{?with_tests:test}
72%endif
73
74%install
75rm -rf $RPM_BUILD_ROOT
76
77%if %{with python2}
78%py_install
79
80%py_postclean
81%endif
82
83%if %{with python3}
84%py3_install
85%endif
86
87%clean
88rm -rf $RPM_BUILD_ROOT
89
90%if %{with python2}
91%files
92%defattr(644,root,root,755)
93%doc README.rst
94%{py_sitescriptdir}/sure
95%{py_sitescriptdir}/sure-%{version}-py*.egg-info
96%endif
97
98%if %{with python3}
99%files -n python3-%{module}
100%defattr(644,root,root,755)
101%doc README.rst
102%{py3_sitescriptdir}/sure
103%{py3_sitescriptdir}/sure-%{version}-py*.egg-info
104%endif
This page took 0.080805 seconds and 4 git commands to generate.