]> git.pld-linux.org Git - packages/python-zope.location.git/blob - python-zope.location.spec
1168c2e73070f236e61631a6acee9dc10e5dc5b6
[packages/python-zope.location.git] / python-zope.location.spec
1 #
2 # Conditional build:
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
7
8 %define module  zope.location
9 Summary:        Zope location module
10 Summary(pl.UTF-8):      Moduł Zope location
11 Name:           python-%{module}
12 Version:        4.2
13 Release:        1
14 License:        ZPL v2.1
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/
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-zope.component >= 4.0.1
25 BuildRequires:  python-zope.configuration
26 BuildRequires:  python-zope.copy >= 4.0
27 BuildRequires:  python-zope.testrunner
28 %endif
29 %endif
30 %if %{with python3}
31 BuildRequires:  python3 >= 1:3.4
32 BuildRequires:  python3-devel >= 1:3.4
33 BuildRequires:  python3-setuptools
34 %if %{with tests}
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
39 %endif
40 %endif
41 BuildRequires:  rpm-pythonprov
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 %if %{with doc}
44 BuildRequires:  python3-repoze.sphinx.autointerface
45 BuildRequires:  sphinx-pdg-3
46 %endif
47 Requires:       python-modules >= 1:2.7
48 BuildArch:      noarch
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %description
52 In Zope, "locations" are special objects that have a structural
53 location, indicated with __name__ and __parent__ attributes.
54
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__.
58
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
64
65 %description -n python3-%{module}
66 In Zope, "locations" are special objects that have a structural
67 location, indicated with __name__ and __parent__ attributes.
68
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__.
72
73 %package apidocs
74 Summary:        API documentation for Python zope.location module
75 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.location
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for Python zope.location module.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API modułu Pythona zope.location.
83
84 %prep
85 %setup -q -n %{module}-%{version}
86
87 %build
88 %if %{with python2}
89 %py_build
90
91 %if %{with tests}
92 PYTHONPATH=$(pwd)/src \
93 zope-testrunner-2 --test-path=src -v
94 %endif
95 %endif
96
97 %if %{with python3}
98 %py3_build
99
100 %if %{with tests}
101 PYTHONPATH=$(pwd)/src \
102 zope-testrunner-3 --test-path=src -v
103 %endif
104 %endif
105
106 %if %{with doc}
107 PYTHONPATH=$(pwd)/src \
108 %{__make} -C docs html \
109         SPHINXBUILD=sphinx-build-3
110 %endif
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %py_install
117
118 %py_postclean
119 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/zope/location/tests
120 %endif
121
122 %if %{with python3}
123 %py3_install
124
125 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/zope/location/tests
126 %endif
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
131 %if %{with python2}
132 %files
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
138 %endif
139
140 %if %{with python3}
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
147 %endif
148
149 %if %{with doc}
150 %files apidocs
151 %defattr(644,root,root,755)
152 %doc docs/_build/html/{_static,*.html,*.js}
153 %endif
This page took 0.069553 seconds and 2 git commands to generate.