]>
Commit | Line | Data |
---|---|---|
3c190d4a JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | Summary: ANSI Color formatting for output in terminal | |
7 | Summary(pl.UTF-8): Kolorowe formatowanie wyjścia na terminalu przy użyciu sekwencji ANSI | |
8 | Name: python-termcolor | |
33ab89e7 | 9 | Version: 1.1.0 |
c17c3def | 10 | Release: 6 |
3c190d4a | 11 | License: MIT |
1deeb97b | 12 | Group: Development/Languages/Python |
3c190d4a | 13 | Source0: https://files.pythonhosted.org/packages/source/t/termcolor/termcolor-%{version}.tar.gz |
33ab89e7 | 14 | # Source0-md5: 043e89644f8909d462fbbfa511c768df |
3c190d4a JB |
15 | URL: https://pypi.org/project/termcolor/ |
16 | %{?with_python2:BuildRequires: python-modules >= 1:2.6} | |
17 | %{?with_python3:BuildRequires: python3-modules >= 1:3.2} | |
1deeb97b | 18 | BuildRequires: rpm-pythonprov |
3c190d4a JB |
19 | BuildRequires: rpmbuild(macros) >= 1.714 |
20 | Requires: python-modules >= 1:2.6 | |
1deeb97b | 21 | BuildArch: noarch |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
3c190d4a JB |
25 | ANSI Color formatting for output in terminal. |
26 | ||
27 | %description -l pl.UTF-8 | |
28 | Kolorowe formatowanie wyjścia na terminalu przy użyciu sekwencji ANSI. | |
29 | ||
30 | %package -n python3-termcolor | |
31 | Summary: ANSI Color formatting for output in terminal | |
32 | Summary(pl.UTF-8): Kolorowe formatowanie wyjścia na terminalu przy użyciu sekwencji ANSI | |
33 | Group: Development/Languages/Python | |
34 | Requires: python3-modules >= 1:3.2 | |
35 | ||
36 | %description -n python3-termcolor | |
37 | ANSI Color formatting for output in terminal. | |
38 | ||
39 | %description -n python3-termcolor -l pl.UTF-8 | |
40 | Kolorowe formatowanie wyjścia na terminalu przy użyciu sekwencji ANSI. | |
1deeb97b | 41 | |
42 | %prep | |
3c190d4a | 43 | %setup -q -n termcolor-%{version} |
1deeb97b | 44 | |
45 | %build | |
3c190d4a | 46 | %if %{with python2} |
39949848 | 47 | %py_build |
3c190d4a JB |
48 | %endif |
49 | ||
50 | %if %{with python3} | |
51 | %py3_build | |
52 | %endif | |
1deeb97b | 53 | |
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
3c190d4a JB |
56 | |
57 | %if %{with python2} | |
39949848 | 58 | %py_install |
1deeb97b | 59 | |
1deeb97b | 60 | %py_postclean |
3c190d4a JB |
61 | %endif |
62 | ||
63 | %if %{with python3} | |
64 | %py3_install | |
65 | %endif | |
1deeb97b | 66 | |
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
3c190d4a | 70 | %if %{with python2} |
1deeb97b | 71 | %files |
72 | %defattr(644,root,root,755) | |
3c190d4a JB |
73 | %doc CHANGES.rst COPYING.txt README.rst |
74 | %{py_sitescriptdir}/termcolor.py[co] | |
75 | %{py_sitescriptdir}/termcolor-%{version}-py*.egg-info | |
76 | %endif | |
77 | ||
78 | %if %{with python3} | |
79 | %files -n python3-termcolor | |
80 | %defattr(644,root,root,755) | |
81 | %doc CHANGES.rst COPYING.txt README.rst | |
82 | %{py3_sitescriptdir}/termcolor.py | |
83 | %{py3_sitescriptdir}/__pycache__/termcolor.cpython-*.py[co] | |
84 | %{py3_sitescriptdir}/termcolor-%{version}-py*.egg-info | |
1deeb97b | 85 | %endif |