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