]> git.pld-linux.org Git - packages/python-extras.git/blob - python-extras.spec
- invoke unittest directly
[packages/python-extras.git] / python-extras.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test" (use for extras/testtools pair bootstrap)
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Useful extra bits for Python - things that should be in the standard library
8 Summary(pl.UTF-8):      Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
9 Name:           python-extras
10 Version:        1.0.0
11 Release:        4
12 License:        MIT
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/extras/
15 Source0:        https://files.pythonhosted.org/packages/source/e/extras/extras-%{version}.tar.gz
16 # Source0-md5:  3a63ad60cf8f0186c9e3a02f55ec5b14
17 URL:            https://github.com/testing-cabal/extras
18 BuildRequires:  rpm-pythonprov
19 BuildRequires:  rpmbuild(macros) >= 1.714
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.6
22 BuildRequires:  python-setuptools
23 %if %{with tests}
24 BuildRequires:  python-testtools
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.2
29 BuildRequires:  python3-setuptools
30 %if %{with tests}
31 BuildRequires:  python3-testtools
32 %endif
33 %endif
34 Requires:       python-modules >= 1:2.6
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 extras is a set of extensions to the Python standard library,
40 originally written to make the code within testtools cleaner, but now
41 split out for general use outside of a testing context.
42
43 %description -l pl.UTF-8
44 extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
45 napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
46 później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
47
48 %package -n python3-extras
49 Summary:        Useful extra bits for Python - things that should be in the standard library
50 Summary(pl.UTF-8):      Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
51 Group:          Libraries/Python
52 Requires:       python3-modules >= 1:3.2
53
54 %description -n python3-extras
55 extras is a set of extensions to the Python standard library,
56 originally written to make the code within testtools cleaner, but now
57 split out for general use outside of a testing context.
58
59 %description -n python3-extras -l pl.UTF-8
60 extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
61 napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
62 później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
63
64 %prep
65 %setup -q -n extras-%{version}
66
67 %build
68 %if %{with python2}
69 %py_build
70
71 %if %{with tests}
72 %{__python} -m unittest discover -s extras.tests
73 %endif
74 %endif
75
76 %if %{with python3}
77 %py3_build
78
79 %if %{with tests}
80 %{__python3} -m unittest discover -s extras.tests
81 %endif
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/extras/tests
92 %endif
93
94 %if %{with python3}
95 %py3_install
96
97 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/extras/tests
98 %endif
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %files
105 %defattr(644,root,root,755)
106 %doc LICENSE NEWS README.rst
107 %{py_sitescriptdir}/extras
108 %{py_sitescriptdir}/extras-%{version}-py*.egg-info
109 %endif
110
111 %if %{with python3}
112 %files -n python3-extras
113 %defattr(644,root,root,755)
114 %doc LICENSE NEWS README.rst
115 %{py3_sitescriptdir}/extras
116 %{py3_sitescriptdir}/extras-%{version}-py*.egg-info
117 %endif
This page took 0.064271 seconds and 3 git commands to generate.