]>
Commit | Line | Data |
---|---|---|
d9c8cfd4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # Sphinx documentation | |
4 | %bcond_without tests # unit tests | |
5 | %bcond_without python2 # CPython 2.x module | |
6 | %bcond_without python3 # CPython 3.x module | |
7 | ||
8 | %define module zope.configuration | |
9 | Summary: Zope Configuration Markup Language (ZCML) | |
10 | Summary(pl.UTF-8): Zope Configuration Markup Language (ZCML) - język opisu konfiguracji Zope | |
11 | Name: python-%{module} | |
12 | Version: 4.4.0 | |
c018e5b0 | 13 | Release: 2 |
d9c8cfd4 JB |
14 | License: ZPL v2.1 |
15 | Group: Libraries/Python | |
16 | Source0: https://files.pythonhosted.org/packages/source/z/zope.configuration/zope.configuration-%{version}.tar.gz | |
17 | # Source0-md5: 4987bd8a1df531ea594cd6bb2fc700ed | |
18 | URL: https://www.zope.dev/ | |
19 | %if %{with python2} | |
20 | BuildRequires: python >= 1:2.7 | |
21 | BuildRequires: python-devel >= 1:2.7 | |
22 | BuildRequires: python-setuptools | |
23 | %if %{with tests} | |
24 | BuildRequires: python-manuel | |
25 | BuildRequires: python-zope.i18nmessageid | |
26 | BuildRequires: python-zope.interface | |
27 | BuildRequires: python-zope.schema >= 4.9.0 | |
28 | BuildRequires: python-zope.testing | |
29 | BuildRequires: python-zope.testrunner | |
30 | %endif | |
31 | %endif | |
32 | %if %{with python3} | |
33 | BuildRequires: python3 >= 1:3.5 | |
34 | BuildRequires: python3-devel >= 1:3.5 | |
35 | BuildRequires: python3-setuptools | |
36 | %if %{with tests} | |
37 | BuildRequires: python3-manuel | |
38 | BuildRequires: python3-zope.i18nmessageid | |
39 | BuildRequires: python3-zope.interface | |
40 | BuildRequires: python3-zope.schema >= 4.9.0 | |
41 | BuildRequires: python3-zope.testing | |
42 | BuildRequires: python3-zope.testrunner | |
43 | %endif | |
44 | %endif | |
45 | BuildRequires: rpm-pythonprov | |
46 | BuildRequires: rpmbuild(macros) >= 1.714 | |
47 | %if %{with doc} | |
48 | BuildRequires: python3-repoze.sphinx.autointerface | |
49 | BuildRequires: sphinx-pdg-3 | |
50 | %endif | |
51 | Requires: python-modules >= 1:2.7 | |
52 | BuildArch: noarch | |
53 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
54 | ||
55 | %description | |
56 | The Zope configuration system provides an extensible system for | |
57 | supporting various kinds of configurations. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | System konfiguracji Zope to rozszerzalny system obsługujący różne | |
61 | rodzaje konfiguracji. | |
62 | ||
63 | %package -n python3-%{module} | |
64 | Summary: Zope Configuration Markup Language (ZCML) | |
65 | Summary(pl.UTF-8): Zope Configuration Markup Language (ZCML) - język opisu konfiguracji Zope | |
66 | Group: Libraries/Python | |
67 | Requires: python3-modules >= 1:3.5 | |
68 | ||
69 | %description -n python3-%{module} | |
70 | The Zope configuration system provides an extensible system for | |
71 | supporting various kinds of configurations. | |
72 | ||
73 | %description -n python3-%{module} -l pl.UTF-8 | |
74 | System konfiguracji Zope to rozszerzalny system obsługujący różne | |
75 | rodzaje konfiguracji. | |
76 | ||
77 | %package apidocs | |
78 | Summary: API documentation for Python zope.configuration module | |
79 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.configuration | |
80 | Group: Documentation | |
81 | ||
82 | %description apidocs | |
83 | API documentation for Python zope.configuration module. | |
84 | ||
85 | %description apidocs -l pl.UTF-8 | |
86 | Dokumentacja API modułu Pythona zope.configuration. | |
87 | ||
88 | %prep | |
89 | %setup -q -n %{module}-%{version} | |
90 | ||
91 | %build | |
92 | %if %{with python2} | |
93 | %py_build | |
94 | ||
95 | %if %{with tests} | |
96 | PYTHONPATH=$(pwd)/src \ | |
97 | zope-testrunner-2 --test-path=src -v | |
98 | %endif | |
99 | %endif | |
100 | ||
101 | %if %{with python3} | |
102 | %py3_build | |
103 | ||
104 | %if %{with tests} | |
105 | PYTHONPATH=$(pwd)/src \ | |
106 | zope-testrunner-3 --test-path=src -v | |
107 | %endif | |
108 | %endif | |
109 | ||
110 | %if %{with doc} | |
111 | PYTHONPATH=$(pwd)/src \ | |
112 | %{__make} -C docs html \ | |
113 | SPHINXBUILD=sphinx-build-3 | |
114 | %endif | |
115 | ||
116 | %install | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %if %{with python2} | |
120 | %py_install | |
121 | ||
122 | %py_postclean | |
123 | %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/configuration/tests | |
124 | %endif | |
125 | ||
126 | %if %{with python3} | |
127 | %py3_install | |
128 | ||
129 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/configuration/tests | |
130 | %endif | |
131 | ||
132 | %clean | |
133 | rm -rf $RPM_BUILD_ROOT | |
134 | ||
135 | %if %{with python2} | |
136 | %files | |
137 | %defattr(644,root,root,755) | |
138 | %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst | |
139 | %{py_sitescriptdir}/zope/configuration | |
140 | %{py_sitescriptdir}/zope.configuration-*.egg-info | |
141 | %{py_sitescriptdir}/zope.configuration-*-nspkg.pth | |
142 | %endif | |
143 | ||
144 | %if %{with python3} | |
145 | %files -n python3-%{module} | |
146 | %defattr(644,root,root,755) | |
147 | %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst | |
148 | %{py3_sitescriptdir}/zope/configuration | |
149 | %{py3_sitescriptdir}/zope.configuration-*.egg-info | |
150 | %{py3_sitescriptdir}/zope.configuration-*-nspkg.pth | |
151 | %endif | |
152 | ||
153 | %if %{with doc} | |
154 | %files apidocs | |
155 | %defattr(644,root,root,755) | |
156 | %doc docs/_build/html/{_static,api,*.html,*.js} | |
157 | %endif |