]>
Commit | Line | Data |
---|---|---|
60fd7abf JK |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
10ac27ab JP |
6 | %define _enable_debug_packages 0 |
7 | ||
2afa7b01 | 8 | %define module zope.component |
468e201a | 9 | Summary: Core of the Zope Component Architecture |
7df4ba0e | 10 | Summary(pl.UTF-8): Rdzeń Zope Component Architecture |
2afa7b01 | 11 | Name: python-%{module} |
6cb5e114 | 12 | Version: 4.4.1 |
9019f8cc | 13 | Release: 7 |
468e201a | 14 | License: ZPL 2.1 |
15 | Group: Libraries/Python | |
6cb5e114 JK |
16 | Source0: https://files.pythonhosted.org/packages/source/z/zope.component/zope.component-%{version}.tar.gz |
17 | # Source0-md5: dc43aca08995751159e4b0f98f5afc5a | |
bf84847c | 18 | %if %{with python2} |
acbb4a33 JB |
19 | BuildRequires: python >= 1:2.5 |
20 | BuildRequires: python-devel >= 1:2.5 | |
5777111a | 21 | BuildRequires: python-setuptools |
bf84847c JB |
22 | %endif |
23 | %if %{with python3} | |
24 | BuildRequires: python3 >= 1:3.2 | |
25 | BuildRequires: python3-devel >= 1:3.2 | |
26 | BuildRequires: python3-setuptools | |
27 | %endif | |
e1aeb040 | 28 | BuildRequires: rpm-pythonprov |
9f6b0748 | 29 | BuildRequires: rpmbuild(macros) >= 1.710 |
2afa7b01 JK |
30 | Requires: python-zope.deferredimport |
31 | Requires: python-zope.deprecation | |
32 | Requires: python-zope.event | |
33 | Requires: python-zope.interface | |
34 | Requires: python-zope.proxy | |
35 | Requires: python-zope.testing | |
de860754 | 36 | Requires: python-modules |
2afa7b01 JK |
37 | Obsoletes: Zope-Component |
38 | Provides: Zope-Component | |
bd9e8678 | 39 | BuildArch: noarch |
5d8b1fee | 40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
468e201a | 43 | Core of the Zope Component Architecture. |
5d8b1fee | 44 | |
7df4ba0e JB |
45 | %description -l pl.UTF-8 |
46 | Rdzeń architektury komponentowej Zope Component Architecture. | |
47 | ||
60fd7abf JK |
48 | %package -n python3-zope.component |
49 | Summary: Core of the Zope Component Architecture | |
50 | Summary(pl.UTF-8): Rdzeń Zope Component Architecture | |
51 | Group: Libraries/Python | |
52 | ||
53 | %description -n python3-zope.component | |
54 | Core of the Zope Component Architecture. | |
55 | ||
56 | %description -n python3-zope.component -l pl.UTF-8 | |
57 | Rdzeń architektury komponentowej Zope Component Architecture. | |
58 | ||
5d8b1fee | 59 | %prep |
4d3949ec | 60 | %setup -q -n zope.component-%{version} |
5d8b1fee | 61 | |
62 | %build | |
60fd7abf JK |
63 | %if %{with python2} |
64 | %py_build %{?with_tests:test} | |
65 | %endif | |
66 | ||
67 | %if %{with python3} | |
68 | %py3_build %{?with_tests:test} | |
69 | %endif | |
5d8b1fee | 70 | |
71 | %install | |
72 | rm -rf $RPM_BUILD_ROOT | |
60fd7abf JK |
73 | |
74 | %if %{with python2} | |
fd8331a5 | 75 | %py_install \ |
bd9e8678 | 76 | --install-purelib=%{py_sitescriptdir} |
5d8b1fee | 77 | |
e1aeb040 | 78 | %py_postclean |
60fd7abf JK |
79 | %endif |
80 | ||
81 | %if %{with python3} | |
82 | %py3_install \ | |
bd9e8678 | 83 | --install-purelib=%{py3_sitescriptdir} |
60fd7abf | 84 | %endif |
5d8b1fee | 85 | |
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
60fd7abf | 91 | %if %{with python2} |
bd9e8678 JR |
92 | %{py_sitescriptdir}/zope/component |
93 | %{py_sitescriptdir}/zope.component-*.egg-info | |
94 | %{py_sitescriptdir}/zope.component-*-nspkg.pth | |
60fd7abf JK |
95 | %endif |
96 | ||
97 | %files -n python3-zope.component | |
98 | %defattr(644,root,root,755) | |
99 | %if %{with python3} | |
bd9e8678 JR |
100 | %{py3_sitescriptdir}/zope/component |
101 | %{py3_sitescriptdir}/zope.component-*.egg-info | |
102 | %{py3_sitescriptdir}/zope.component-*-nspkg.pth | |
60fd7abf | 103 | %endif |