]>
Commit | Line | Data |
---|---|---|
ae21ab0b JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: Common namespace files for jaraco.* modules | |
7 | Summary(pl.UTF-8): Wspólna przestrzeń nazw dla modułów jaraco.* | |
8 | Name: python-jaraco | |
9 | Version: 0 | |
0f9c43ce | 10 | Release: 6 |
ae21ab0b JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
a7dcd69c | 13 | # taken from jaraco.packaging 6.2 |
ae21ab0b JB |
14 | Source0: jaraco.__init__.py |
15 | URL: https://github.com/jaraco/ | |
16 | BuildRequires: rpm-pythonprov | |
17 | BuildRequires: rpmbuild(macros) >= 1.714 | |
18 | %if %{with python2} | |
19 | BuildRequires: python-modules | |
20 | %endif | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-modules | |
23 | %endif | |
a7dcd69c | 24 | Requires: python-modules |
ae21ab0b JB |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | Common namespace files for jaraco.* modules. | |
30 | ||
31 | %description -l pl.UTF-8 | |
32 | Wspólna przestrzeń nazw dla modułów jaraco.*. | |
33 | ||
34 | %package -n python3-jaraco | |
35 | Summary: Common namespace files for jaraco.* modules | |
36 | Summary(pl.UTF-8): Wspólna przestrzeń nazw dla modułów jaraco.* | |
37 | Group: Libraries/Python | |
a7dcd69c | 38 | Requires: python3-modules |
ae21ab0b JB |
39 | |
40 | %description -n python3-jaraco | |
41 | Common namespace files for jaraco.* modules. | |
42 | ||
43 | %description -n python3-jaraco -l pl.UTF-8 | |
44 | Wspólna przestrzeń nazw dla modułów jaraco.*. | |
45 | ||
46 | %prep | |
47 | ||
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %if %{with python2} | |
52 | install -d $RPM_BUILD_ROOT%{py_sitescriptdir}/jaraco | |
53 | cp -p %{SOURCE0} $RPM_BUILD_ROOT%{py_sitescriptdir}/jaraco/__init__.py | |
54 | ||
55 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
56 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
57 | %py_postclean | |
58 | %endif | |
59 | ||
60 | %if %{with python3} | |
61 | install -d $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco | |
62 | cp -p %{SOURCE0} $RPM_BUILD_ROOT%{py3_sitescriptdir}/jaraco/__init__.py | |
63 | ||
64 | %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir} | |
65 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir} | |
66 | %endif | |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %if %{with python2} | |
72 | %files | |
73 | %defattr(644,root,root,755) | |
74 | %dir %{py_sitescriptdir}/jaraco | |
75 | %{py_sitescriptdir}/jaraco/__init__.py[co] | |
76 | %endif | |
77 | ||
78 | %if %{with python3} | |
79 | %files -n python3-jaraco | |
80 | %defattr(644,root,root,755) | |
81 | %dir %{py3_sitescriptdir}/jaraco | |
82 | %{py3_sitescriptdir}/jaraco/__init__.py | |
83 | %{py3_sitescriptdir}/jaraco/__pycache__ | |
84 | %endif |