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