]> git.pld-linux.org Git - packages/python-zope.deferredimport.git/blame - python-zope.deferredimport.spec
- updated to 4.4, added python3 module and apidocs
[packages/python-zope.deferredimport.git] / python-zope.deferredimport.spec
CommitLineData
8c5fde43
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
8b3d71bd 7
99daff2c 8%define module zope.deferredimport
322e8459
JB
9Summary: Defer Python module import
10Summary(pl.UTF-8): Opóźnianie importu modułów Pythona
99daff2c 11Name: python-%{module}
8c5fde43
JB
12Version: 4.4
13Release: 1
14License: ZPL v2.1
3dce3665 15Group: Libraries/Python
8c5fde43
JB
16Source0: https://files.pythonhosted.org/packages/source/z/zope.deferredimport/zope.deferredimport-%{version}.tar.gz
17# Source0-md5: 05db5a4e2129966e510f9b73368cb7d6
18URL: https://www.zope.dev/
19%if %{with python2}
20BuildRequires: python >= 1:2.7
21BuildRequires: python-devel >= 1:2.7
72159618 22BuildRequires: python-setuptools
8c5fde43
JB
23%if %{with tests}
24BuildRequires: python-zope.proxy
25BuildRequires: python-zope.testrunner
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3 >= 1:3.5
30BuildRequires: python3-devel >= 1:3.5
31BuildRequires: python3-setuptools
32%if %{with tests}
33BuildRequires: python3-zope.proxy
34BuildRequires: python3-zope.testrunner
35%endif
36%endif
322e8459 37BuildRequires: rpm-pythonprov
8c5fde43
JB
38BuildRequires: rpmbuild(macros) >= 1.714
39%if %{with doc}
40BuildRequires: sphinx-pdg
41%endif
42Requires: python-modules >= 1:2.7
43Obsoletes: Zope-DeferredImport < 3.6.0
ca417181 44BuildArch: noarch
2a1d1a85 45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47%description
322e8459
JB
48Defer Python module import.
49
50%description -l pl.UTF-8
51Opóźnianie importu modułów Pythona.
2a1d1a85 52
8c5fde43
JB
53%package -n python3-%{module}
54Summary: Defer Python module import
55Summary(pl.UTF-8): Opóźnianie importu modułów Pythona
56Group: Libraries/Python
57Requires: python3-modules >= 1:3.5
58
59%description -n python3-%{module}
60Defer Python module import.
61
62%description -n python3-%{module} -l pl.UTF-8
63Opóźnianie importu modułów Pythona.
64
65%package apidocs
66Summary: API documentation for Python zope.deferredimport module
67Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.deferredimport
68Group: Documentation
69
70%description apidocs
71API documentation for Python zope.deferredimport module.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API modułu Pythona zope.deferredimport.
75
2a1d1a85 76%prep
99daff2c 77%setup -q -n %{module}-%{version}
2a1d1a85 78
79%build
8c5fde43 80%if %{with python2}
48e73741 81%py_build
2a1d1a85 82
8c5fde43
JB
83%if %{with tests}
84PYTHONPATH=$(pwd)/src \
85zope-testrunner-2 --test-path=src -v
86%endif
87%endif
88
89%if %{with python3}
90%py3_build
91
92%if %{with tests}
93PYTHONPATH=$(pwd)/src \
94zope-testrunner-3 --test-path=src -v
95%endif
96%endif
97
98%if %{with doc}
99PYTHONPATH=$(pwd)/src \
100%{__make} -C docs html
101%endif
102
2a1d1a85 103%install
104rm -rf $RPM_BUILD_ROOT
105
8c5fde43
JB
106%if %{with python2}
107%py_install
2a1d1a85 108
322e8459 109%py_postclean
8c5fde43
JB
110%{__rm} $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/deferredimport/tests.*
111%endif
112
113%if %{with python3}
114%py3_install
115
116%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/deferredimport/tests.*
117%{__rm} $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/deferredimport/__pycache__/tests.*
118%endif
2a1d1a85 119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
8c5fde43 123%if %{with python2}
2a1d1a85 124%files
125%defattr(644,root,root,755)
ca417181
JR
126%{py_sitescriptdir}/zope/deferredimport
127%{py_sitescriptdir}/zope.deferredimport-*.egg-info
128%{py_sitescriptdir}/zope.deferredimport-*-nspkg.pth
8c5fde43
JB
129%endif
130
131%if %{with python3}
132%files -n python3-%{module}
133%defattr(644,root,root,755)
134%{py3_sitescriptdir}/zope/deferredimport
135%{py3_sitescriptdir}/zope.deferredimport-*.egg-info
136%{py3_sitescriptdir}/zope.deferredimport-*-nspkg.pth
137%endif
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
142%doc docs/_build/html/{_modules,_static,*.html,*.js}
143%endif
This page took 0.117534 seconds and 4 git commands to generate.