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