]> git.pld-linux.org Git - packages/python-zope.event.git/blob - python-zope.event.spec
f34af927990d47b90b7d94f3534f6864b4a3e491
[packages/python-zope.event.git] / python-zope.event.spec
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.event
9 Summary:        Simple event system
10 Summary(pl.UTF-8):      Prosty system zdarzeń
11 Name:           python-%{module}
12 Version:        4.4
13 Release:        1
14 License:        ZPL v2.1
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/zope-event/
17 Source0:        https://files.pythonhosted.org/packages/source/z/zope.event/zope.event-%{version}.tar.gz
18 # Source0-md5:  54e5bf148548726d626ec47bb01bec41
19 URL:            https://www.zope.org/
20 %if %{with python2}
21 BuildRequires:  python >= 1:2.7
22 BuildRequires:  python-devel >= 1:2.7
23 BuildRequires:  python-setuptools
24 %if %{with tests}
25 BuildRequires:  python-zope.testrunner
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3 >= 1:3.4
30 BuildRequires:  python3-devel >= 1:3.4
31 BuildRequires:  python3-setuptools
32 %if %{with tests}
33 BuildRequires:  python3-zope.testrunner
34 %endif
35 %endif
36 BuildRequires:  rpm-pythonprov
37 BuildRequires:  rpmbuild(macros) >= 1.714
38 %if %{with doc}
39 BuildRequires:  sphinx-pdg
40 %endif
41 Requires:       python-modules >= 1:2.7
42 Requires:       python-zope-base
43 Obsoletes:      Zope-Event
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %description
47 The zope.event package provides a simple event system. It provides:
48 - an event publishing system
49 - a very simple event-dispatching system on which more sophisticated
50   event dispatching systems can be built. (For example, a type-based
51   event dispatching system that builds on zope.event can be found in
52   zope.component)
53
54 %description -l pl.UTF-8
55 Pakiet zope.event udostępnia prosty system zdarzeń. Zawiera:
56 - system publikacji zdarzeń
57 - bardzo prosty system przekazywania zdarzeń, w oparciu o który można
58   stworzyć bardziej wyszukane systemy przekazywania zdarzeń (na przykład
59   system przekazywania zdarzeń oparty na typach, zbudowany w oparciu o
60   zope.event, można znaleźć w zope.component)
61
62 %package -n python3-%{module}
63 Summary:        Simple event system
64 Summary(pl.UTF-8):      Prosty system zdarzeń
65 Group:          Libraries/Python
66 Requires:       python3-modules >= 1:3.4
67 Requires:       python3-zope-base
68
69 %description -n python3-%{module}
70 The zope.event package provides a simple event system. It provides:
71 - an event publishing system
72 - a very simple event-dispatching system on which more sophisticated
73   event dispatching systems can be built. (For example, a type-based
74   event dispatching system that builds on zope.event can be found in
75   zope.component)
76
77 %description -n python3-%{module} -l pl.UTF-8
78 Pakiet zope.event udostępnia prosty system zdarzeń. Zawiera:
79 - system publikacji zdarzeń
80 - bardzo prosty system przekazywania zdarzeń, w oparciu o który można
81   stworzyć bardziej wyszukane systemy przekazywania zdarzeń (na przykład
82   system przekazywania zdarzeń oparty na typach, zbudowany w oparciu o
83   zope.event, można znaleźć w zope.component)
84
85 %package apidocs
86 Summary:        API documentation for Python zope.event module
87 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zope.event
88 Group:          Documentation
89
90 %description apidocs
91 API documentation for Python zope.event module.
92
93 %description apidocs -l pl.UTF-8
94 Dokumentacja API modułu Pythona zope.event.
95
96 %prep
97 %setup -q -n %{module}-%{version}
98
99 %build
100 %if %{with python2}
101 %py_build
102
103 %if %{with tests}
104 PYTHONPATH=$(pwd)/src \
105 %{__python} -m zope.testrunner --test-path=src
106 %endif
107 %endif
108
109 %if %{with python3}
110 %py3_build
111
112 %if %{with tests}
113 PYTHONPATH=$(pwd)/src \
114 %{__python3} -m zope.testrunner --test-path=src
115 %endif
116 %endif
117
118 %if %{with doc}
119 PYTHONPATH=$(pwd)/src \
120 %{__make} -C docs html
121 %endif
122
123 %install
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with python2}
127 %py_install \
128         --install-purelib=%{py_sitedir}
129
130 %py_postclean
131 %endif
132
133 %if %{with python3}
134 %py3_install \
135         --install-purelib=%{py3_sitedir}
136 %endif
137
138 %clean
139 rm -rf $RPM_BUILD_ROOT
140
141 %if %{with python2}
142 %files
143 %defattr(644,root,root,755)
144 %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst
145 %{py_sitedir}/zope/event
146 %{py_sitedir}/zope.event-%{version}-py*.egg-info
147 %{py_sitedir}/zope.event-%{version}-py*-nspkg.pth
148 %endif
149
150 %if %{with python3}
151 %files -n python3-%{module}
152 %defattr(644,root,root,755)
153 %{py3_sitedir}/zope/event
154 %{py3_sitedir}/zope.event-%{version}-py*.egg-info
155 %{py3_sitedir}/zope.event-%{version}-py*-nspkg.pth
156 %endif
157
158 %if %{with doc}
159 %files apidocs
160 %defattr(644,root,root,755)
161 %doc docs/_build/html/{_modules,_static,*.html,*.js}
162 %endif
This page took 0.058665 seconds and 2 git commands to generate.