3 %bcond_without doc # Sphinx documentation
4 %bcond_with tests # unit tests (circular dependencies)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module zope.location
9 Summary: Zope location module
10 Summary(pl.UTF-8): Moduł Zope location
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://files.pythonhosted.org/packages/source/z/zope.location/zope.location-%{version}.tar.gz
17 # Source0-md5: aeffe240cef8acbe1e61700ccdb174bb
18 URL: https://www.zope.dev/
20 BuildRequires: python >= 1:2.7
21 BuildRequires: python-devel >= 1:2.7
22 BuildRequires: python-setuptools
24 BuildRequires: python-zope.component >= 4.0.1
25 BuildRequires: python-zope.configuration
26 BuildRequires: python-zope.copy >= 4.0
27 BuildRequires: python-zope.testrunner
31 BuildRequires: python3 >= 1:3.4
32 BuildRequires: python3-devel >= 1:3.4
33 BuildRequires: python3-setuptools
35 BuildRequires: python3-zope.component >= 4.0.1
36 BuildRequires: python3-zope.configuration
37 BuildRequires: python3-zope.copy >= 4.0
38 BuildRequires: python3-zope.testrunner
41 BuildRequires: rpm-pythonprov
42 BuildRequires: rpmbuild(macros) >= 1.714
44 BuildRequires: python3-repoze.sphinx.autointerface
45 BuildRequires: sphinx-pdg-3
47 Requires: python-modules >= 1:2.7
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 In Zope, "locations" are special objects that have a structural
53 location, indicated with __name__ and __parent__ attributes.
55 %description -l pl.UTF-8
56 W Zope obiekty "location" to specjalne obiekty, mające położenie
57 strukturalne, określane przez atrybuty __name__ i __parent__.
59 %package -n python3-%{module}
60 Summary: Zope location module
61 Summary(pl.UTF-8): Moduł Zope location
62 Group: Libraries/Python
63 Requires: python3-modules >= 1:3.4
65 %description -n python3-%{module}
66 In Zope, "locations" are special objects that have a structural
67 location, indicated with __name__ and __parent__ attributes.
69 %description -n python3-%{module} -l pl.UTF-8
70 W Zope obiekty "location" to specjalne obiekty, mające położenie
71 strukturalne, określane przez atrybuty __name__ i __parent__.
74 Summary: API documentation for Python zope.location module
75 Summary(pl.UTF-8): Dokumentacja API modułu Pythona zope.location
79 API documentation for Python zope.location module.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona zope.location.
85 %setup -q -n %{module}-%{version}
92 PYTHONPATH=$(pwd)/src \
93 zope-testrunner-2 --test-path=src -v
101 PYTHONPATH=$(pwd)/src \
102 zope-testrunner-3 --test-path=src -v
107 PYTHONPATH=$(pwd)/src \
108 %{__make} -C docs html \
109 SPHINXBUILD=sphinx-build-3
113 rm -rf $RPM_BUILD_ROOT
119 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/location/tests
125 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/location/tests
129 rm -rf $RPM_BUILD_ROOT
133 %defattr(644,root,root,755)
134 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
135 %{py_sitescriptdir}/zope/location
136 %{py_sitescriptdir}/zope.location-%{version}-py*.egg-info
137 %{py_sitescriptdir}/zope.location-%{version}-py*-nspkg.pth
141 %files -n python3-%{module}
142 %defattr(644,root,root,755)
143 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
144 %{py3_sitescriptdir}/zope/location
145 %{py3_sitescriptdir}/zope.location-%{version}-py*.egg-info
146 %{py3_sitescriptdir}/zope.location-%{version}-py*-nspkg.pth
151 %defattr(644,root,root,755)
152 %doc docs/_build/html/{_static,*.html,*.js}