]> git.pld-linux.org Git - packages/python-zope.i18nmessageid.git/blame - python-zope.i18nmessageid.spec
rebuild with tests and docs
[packages/python-zope.i18nmessageid.git] / python-zope.i18nmessageid.spec
CommitLineData
a0a71f6f
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests (installed package required)
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module zope.i18nmessageid
9Summary: Message Identifiers for internationalization
10Summary(pl.UTF-8): Identyfikatory komunikatów do lokalizacji
11Name: python-%{module}
12Version: 5.0.1
9a6320fe 13Release: 3
a0a71f6f
JB
14License: ZPL v2.1
15Group: Libraries/Python
16Source0: https://files.pythonhosted.org/packages/source/z/zope.i18nmessageid/zope.i18nmessageid-%{version}.tar.gz
17# Source0-md5: 2ee5f51c26e2a5a040ba2defb3f9d8a7
18URL: https://www.zope.dev/
19%if %{with python2}
20BuildRequires: python >= 1:2.7
21BuildRequires: python-devel >= 1:2.7
22BuildRequires: python-setuptools
23%if %{with tests}
24BuildRequires: python-six
25BuildRequires: python-zope.testing
26BuildRequires: python-zope.testrunner
27%endif
28%endif
29%if %{with python3}
30BuildRequires: python3 >= 1:3.5
31BuildRequires: python3-devel >= 1:3.5
32BuildRequires: python3-setuptools
33%if %{with tests}
34BuildRequires: python3-six
35BuildRequires: python3-zope.testing
36BuildRequires: python3-zope.testrunner
37%endif
38%endif
39BuildRequires: rpm-pythonprov
40BuildRequires: rpmbuild(macros) >= 1.714
41%if %{with doc}
42BuildRequires: sphinx-pdg
43%endif
44Requires: python-modules >= 1:2.7
a0a71f6f
JB
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
48Message Identifiers for internationalization.
49
50%description -l pl.UTF-8
51Identyfikatory komunikatów do lokalizacji.
52
53%package -n python3-%{module}
54Summary: Message Identifiers for internationalization
55Summary(pl.UTF-8): Identyfikatory komunikatów do lokalizacji
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.5
58
59%description -n python3-%{module}
60Message Identifiers for internationalization.
61
62%description -n python3-%{module} -l pl.UTF-8
63Identyfikatory komunikatów do lokalizacji.
64
65%package apidocs
66Summary: API documentation for Python zope.i18nmessageid module
67Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.i18nmessageid
68Group: Documentation
69
70%description apidocs
71API documentation for Python zope.i18nmessageid module.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API modułu Pythona zope.i18nmessageid.
75
76%prep
77%setup -q -n %{module}-%{version}
78
79%build
80%if %{with python2}
81%py_build %{?with_tests:test}
82%endif
83
84%if %{with python3}
85%py3_build %{?with_tests:test}
86%endif
87
88%if %{with doc}
89PYTHONPATH=$(pwd)/src \
90%{__make} -C docs html
91%endif
92
93%install
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%py_install
98
99%py_postclean
100%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/i18nmessageid/*.[ch]
101%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/zope/i18nmessageid/tests.*
102%endif
103
104%if %{with python3}
105%py3_install
106
107%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/i18nmessageid/*.[ch]
108%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/i18nmessageid/tests.*
109%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/zope/i18nmessageid/__pycache__/tests.*
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
119%dir %{py_sitedir}/zope/i18nmessageid
120%{py_sitedir}/zope/i18nmessageid/*.py[co]
121%attr(755,root,root) %{py_sitedir}/zope/i18nmessageid/_zope_i18nmessageid_message.so
122%{py_sitedir}/zope.i18nmessageid-*.egg-info
123%{py_sitedir}/zope.i18nmessageid-*-nspkg.pth
124%endif
125
126%if %{with python3}
127%files -n python3-%{module}
128%defattr(644,root,root,755)
129%doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
130%dir %{py3_sitedir}/zope/i18nmessageid
131%{py3_sitedir}/zope/i18nmessageid/*.py
132%{py3_sitedir}/zope/i18nmessageid/__pycache__
133%attr(755,root,root) %{py3_sitedir}/zope/i18nmessageid/_zope_i18nmessageid_message.cpython-*.so
134%{py3_sitedir}/zope.i18nmessageid-*.egg-info
135%{py3_sitedir}/zope.i18nmessageid-*-nspkg.pth
136%endif
137
138%if %{with doc}
139%files apidocs
140%defattr(644,root,root,755)
141%doc docs/_build/html/{_modules,_static,*.html,*.js}
142%endif
This page took 0.232137 seconds and 4 git commands to generate.