]> git.pld-linux.org Git - packages/python-sure.git/blame - python-sure.spec
Release 2. Fixed Python 3.4 build and tests.
[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
AM
6
7%define module sure
8Summary: Utility belt for automated testing in python for python
9Name: python-%{module}
66ec76e3 10Version: 1.2.12
e746740d 11Release: 2
5d118f35
AM
12License: GPL v3+
13Group: Libraries/Python
66ec76e3
MK
14# Source0: https://github.com/gabrielfalcao/sure/archive/%{version}.tar.gz
15Source0: https://pypi.python.org/packages/source/s/%{module}/%{module}-%{version}.tar.gz
16# Source0-md5: fc57c30e76bddba68f84443ec91e7026
e746740d 17Patch0: %{name}-py3_fixes.patch
5d118f35
AM
18URL: https://github.com/gabrielfalcao/sure
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.219
21%if %{with python2}
22BuildRequires: python-devel
23BuildRequires: python-distribute
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
27BuildRequires: python3-distribute
28BuildRequires: python3-modules
29%endif
30Requires: python-modules
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35A testing library for python with powerful and flexible assertions.
36Sure is heavily inspired by should.js.
37
38%package -n python3-%{module}
39Summary: Utility belt for automated testing in python for python
40Group: Libraries/Python
41Requires: python3-modules
42
43%description -n python3-%{module}
44A testing library for python with powerful and flexible assertions.
45Sure is heavily inspired by should.js.
46
47%prep
48%setup -q -n %{module}-%{version}
e746740d 49%patch0 -p1
5d118f35
AM
50
51%build
52%if %{with python2}
53%{__python} setup.py build --build-base build-2 %{?with_tests:test}
54%endif
55
56%if %{with python3}
5d118f35
AM
57%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
58%endif
59
60%install
61rm -rf $RPM_BUILD_ROOT
62
63%if %{with python2}
64%{__python} setup.py \
65 build --build-base build-2 \
66 install --skip-build \
67 --optimize=2 \
68 --root=$RPM_BUILD_ROOT
69
70%py_postclean
71%endif
72
73%if %{with python3}
74%{__python3} setup.py \
75 build --build-base build-3 \
76 install --skip-build \
77 --optimize=2 \
78 --root=$RPM_BUILD_ROOT
79%endif
80
81%clean
82rm -rf $RPM_BUILD_ROOT
83
84%if %{with python2}
85%files
86%defattr(644,root,root,755)
66ec76e3 87%doc README.md
5d118f35
AM
88%dir %{py_sitescriptdir}/sure
89%{py_sitescriptdir}/sure/*.py[co]
90%if "%{py_ver}" > "2.4"
91%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
92%endif
93%endif
94
95%if %{with python3}
96%files -n python3-%{module}
97%defattr(644,root,root,755)
66ec76e3 98%doc README.md
5d118f35
AM
99%{py3_sitescriptdir}/%{module}
100%{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info
101%endif
This page took 0.114823 seconds and 4 git commands to generate.