]> git.pld-linux.org Git - packages/python-case.git/blob - python-case.spec
877eb2fbb46aea2affa24a6ce209010a70a0e183
[packages/python-case.git] / python-case.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_with     tests   # unit tests (not included in sdist)
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7
8 Summary:        Python unittest utilities
9 Summary(pl.UTF-8):      Pythonowe narzędzia do testów jednostkowych
10 Name:           python-case
11 Version:        1.5.3
12 Release:        3
13 License:        BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/case/
16 Source0:        https://files.pythonhosted.org/packages/source/c/case/case-%{version}.tar.gz
17 # Source0-md5:  169acc1fe087b8938cdf31da8ab426be
18 URL:            https://pypi.org/project/case/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.6
21 BuildRequires:  python-setuptools >= 1:20.6.7
22 %if %{with tests}
23 BuildRequires:  python-mock >= 2.0
24 BuildRequires:  python-nose >= 1.3.7
25 BuildRequires:  python-pytest
26 BuildRequires:  python-six
27 %endif
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-modules >= 1:3.3
31 BuildRequires:  python3-setuptools >= 1:20.6.7
32 %if %{with tests}
33 BuildRequires:  python3-nose >= 1.3.7
34 BuildRequires:  python3-pytest
35 BuildRequires:  python3-six
36 %endif
37 %endif
38 BuildRequires:  rpm-pythonprov
39 BuildRequires:  rpmbuild(macros) >= 1.714
40 %if %{with doc}
41 BuildRequires:  python3-sphinx_celery >= 1.1
42 BuildRequires:  sphinx-pdg-3
43 %endif
44 Requires:       python-modules >= 1:2.6
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Python unittest utilities.
50
51 %description -l pl.UTF-8
52 Pythonowe narzędzia do testów jednostkowych.
53
54 %package -n python3-case
55 Summary:        Python unittest utilities
56 Summary(pl.UTF-8):      Pythonowe narzędzia do testów jednostkowych
57 Group:          Libraries/Python
58 Requires:       python3-modules >= 1:3.3
59
60 %description -n python3-case
61 Python unittest utilities.
62
63 %description -n python3-case -l pl.UTF-8
64 Pythonowe narzędzia do testów jednostkowych.
65
66 %package apidocs
67 Summary:        API documentation for Python case module
68 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona case
69 Group:          Documentation
70
71 %description apidocs
72 API documentation for Python case module.
73
74 %description apidocs -l pl.UTF-8
75 Dokumentacja API modułu Pythona case.
76
77 %prep
78 %setup -q -n case-%{version}
79
80 %build
81 %if %{with python2}
82 %py_build
83
84 %if %{with tests}
85 %{__python} -m nose case/tests
86 %endif
87 %endif
88
89 %if %{with python3}
90 %py3_build
91
92 %if %{with tests}
93 %{__python3} -m nose case/tests
94 %endif
95 %endif
96
97 %if %{with doc}
98 %{__make} -C docs html \
99         SPHINXBUILD=sphinx-build-3
100 %endif
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %if %{with python2}
106 %py_install
107
108 %py_postclean
109 %endif
110
111 %if %{with python3}
112 %py3_install
113 %endif
114
115 %clean
116 rm -rf $RPM_BUILD_ROOT
117
118 %if %{with python2}
119 %files
120 %defattr(644,root,root,755)
121 %doc Changelog LICENSE README.rst
122 %{py_sitescriptdir}/case
123 %{py_sitescriptdir}/case-%{version}-py*.egg-info
124 %endif
125
126 %if %{with python3}
127 %files -n python3-case
128 %defattr(644,root,root,755)
129 %doc Changelog LICENSE README.rst
130 %{py3_sitescriptdir}/case
131 %{py3_sitescriptdir}/case-%{version}-py*.egg-info
132 %endif
133
134 %if %{with doc}
135 %files apidocs
136 %defattr(644,root,root,755)
137 %doc docs/_build/html/{_modules,_static,reference,*.html,*.js}
138 %endif
This page took 0.076818 seconds and 2 git commands to generate.