]>
Commit | Line | Data |
---|---|---|
6ed7cddb | 1 | # |
c4d7b6c8 JP |
2 | # Conditional build: |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module ruamel.base | |
7 | Summary: Common routines for ruamel packages | |
6ed7cddb | 8 | Summary(pl.UTF-8): Wspólne funkcje dla pakietów ruamel |
c4d7b6c8 JP |
9 | Name: python-%{module} |
10 | Version: 1.0.0 | |
6ed7cddb | 11 | Release: 3 |
c4d7b6c8 JP |
12 | License: MIT |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/ruamel.base/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/r/ruamel.base/%{module}-%{version}.tar.gz | |
16 | # Source0-md5: 5b2fb0e7df10672eb2a48dc329f770ee | |
17 | URL: https://pypi.org/project/ruamel.base/ | |
18 | BuildRequires: rpm-pythonprov | |
19 | BuildRequires: rpmbuild(macros) >= 1.714 | |
20 | %if %{with python2} | |
6ed7cddb | 21 | BuildRequires: python-modules >= 2 |
c4d7b6c8 JP |
22 | BuildRequires: python-setuptools |
23 | %endif | |
24 | %if %{with python3} | |
6ed7cddb | 25 | BuildRequires: python3-modules >= 1:3.2 |
c4d7b6c8 JP |
26 | BuildRequires: python3-setuptools |
27 | %endif | |
6ed7cddb | 28 | Requires: python-modules >= 2 |
c4d7b6c8 JP |
29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30 | ||
31 | %description | |
32 | Common routines for ruamel packages. | |
33 | ||
6ed7cddb JB |
34 | %description -l pl.UTF-8 |
35 | Wspólne funkcje dla pakietów ruamel. | |
36 | ||
c4d7b6c8 JP |
37 | %package -n python3-%{module} |
38 | Summary: Common routines for ruamel packages | |
6ed7cddb | 39 | Summary(pl.UTF-8): Wspólne funkcje dla pakietów ruamel |
c4d7b6c8 | 40 | Group: Libraries/Python |
6ed7cddb | 41 | Requires: python3-modules >= 1:3.2 |
c4d7b6c8 JP |
42 | |
43 | %description -n python3-%{module} | |
44 | Common routines for ruamel packages. | |
45 | ||
6ed7cddb JB |
46 | %description -n python3-%{module} -l pl.UTF-8 |
47 | Wspólne funkcje dla pakietów ruamel. | |
48 | ||
c4d7b6c8 JP |
49 | %prep |
50 | %setup -q -n %{module}-%{version} | |
51 | ||
52 | %build | |
53 | %if %{with python2} | |
54 | %py_build | |
55 | %endif | |
56 | ||
57 | %if %{with python3} | |
58 | %py3_build | |
59 | %endif | |
60 | ||
61 | %install | |
62 | rm -rf $RPM_BUILD_ROOT | |
63 | ||
c4d7b6c8 JP |
64 | %if %{with python2} |
65 | install -d $RPM_BUILD_ROOT%{py_sitedir}/ruamel | |
66 | ||
67 | %py_install | |
68 | ||
69 | %py_postclean | |
70 | %endif | |
71 | ||
72 | %if %{with python3} | |
73 | install -d $RPM_BUILD_ROOT%{py3_sitedir}/ruamel | |
74 | ||
75 | %py3_install | |
76 | %endif | |
77 | ||
78 | %clean | |
79 | rm -rf $RPM_BUILD_ROOT | |
80 | ||
81 | %if %{with python2} | |
82 | %files | |
83 | %defattr(644,root,root,755) | |
6ed7cddb | 84 | %doc LICENSE README.rst |
c4d7b6c8 JP |
85 | %dir %{py_sitescriptdir}/ruamel |
86 | %{py_sitescriptdir}/ruamel/base | |
6ed7cddb JB |
87 | %{py_sitescriptdir}/ruamel.base-%{version}-py*.egg-info |
88 | %{py_sitescriptdir}/ruamel.base-%{version}-py*-nspkg.pth | |
c4d7b6c8 JP |
89 | %dir %{py_sitedir}/ruamel |
90 | %endif | |
91 | ||
92 | %if %{with python3} | |
93 | %files -n python3-%{module} | |
94 | %defattr(644,root,root,755) | |
6ed7cddb | 95 | %doc LICENSE README.rst |
c4d7b6c8 JP |
96 | %dir %{py3_sitescriptdir}/ruamel |
97 | %{py3_sitescriptdir}/ruamel/base | |
6ed7cddb JB |
98 | %{py3_sitescriptdir}/ruamel.base-%{version}-py*.egg-info |
99 | %{py3_sitescriptdir}/ruamel.base-%{version}-py*-nspkg.pth | |
c4d7b6c8 JP |
100 | %dir %{py3_sitedir}/ruamel |
101 | %endif |