]> git.pld-linux.org Git - packages/python-termstyle.git/blob - python-termstyle.spec
5c8663c39b615766ab9233f933df146dab057ac3
[packages/python-termstyle.git] / python-termstyle.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # smoke tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Console colouring for Python
8 Summary(pl.UTF-8):      Kolory na konsoli dla Pythona
9 Name:           python-termstyle
10 Version:        0.1.11
11 Release:        4
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/termstyle/
15 Source0:        https://files.pythonhosted.org/packages/source/t/termstyle/termstyle-%{version}.tar.gz
16 # Source0-md5:  b6ec81a1c7ebe06f139ce3c294bd3ff8
17 URL:            https://pypi.org/project/termstyle/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 %endif
22 %if %{with python3}
23 BuildRequires:  python3-modules >= 1:3.2
24 BuildRequires:  python3-setuptools
25 %endif
26 BuildRequires:  rpm-pythonprov
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 Requires:       python-modules >= 1:2.5
29 BuildArch:      noarch
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 termstyle is a simple Python library for adding coloured output to
34 terminal (console) programs. The definitions come from ECMA-048, the
35 "Control Functions for Coded Character Sets" standard.
36
37 %description -l pl.UTF-8
38 termstyle to prosta biblioteka Pythona, pozwalająca dodawać kolorowe
39 wyjście do programów terminalowych (konsolowych). Definicje pochodzą
40 ze standardu ECMA-048 ("Control Functions for Coded Character Sets").
41
42 %package -n python3-termstyle
43 Summary:        Console colouring for Python
44 Summary(pl.UTF-8):      Kolory na konsoli dla Pythona
45 Group:          Libraries/Python
46 Requires:       python3-modules >= 1:3.2
47
48 %description -n python3-termstyle
49 termstyle is a simple Python library for adding coloured output to
50 terminal (console) programs. The definitions come from ECMA-048, the
51 "Control Functions for Coded Character Sets" standard.
52
53 %description -n python3-termstyle -l pl.UTF-8
54 termstyle to prosta biblioteka Pythona, pozwalająca dodawać kolorowe
55 wyjście do programów terminalowych (konsolowych). Definicje pochodzą
56 ze standardu ECMA-048 ("Control Functions for Coded Character Sets").
57
58 %prep
59 %setup -q -n termstyle-%{version}
60
61 %build
62 %if %{with python2}
63 %py_build
64
65 %if %{with tests}
66 PYTHONIOENCODING=UTF-8 \
67 %{__python} test2.py
68 %endif
69 %endif
70
71 %if %{with python3}
72 %py3_build
73
74 %if %{with tests}
75 %{__python3} test3.py
76 %endif
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81
82 %if %{with python2}
83 %py_install
84
85 %py_postclean
86 %endif
87
88 %if %{with python3}
89 %py3_install
90 %endif
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %if %{with python2}
96 %files
97 %defattr(644,root,root,755)
98 %doc LICENSE README.rst
99 %{py_sitescriptdir}/termstyle.py[co]
100 %{py_sitescriptdir}/termstyle-%{version}-py*.egg-info
101 %endif
102
103 %if %{with python3}
104 %files -n python3-termstyle
105 %defattr(644,root,root,755)
106 %doc LICENSE README.rst
107 %{py3_sitescriptdir}/termstyle.py
108 %{py3_sitescriptdir}/__pycache__/termstyle.cpython-*.py[co]
109 %{py3_sitescriptdir}/termstyle-%{version}-py*.egg-info
110 %endif
This page took 0.043119 seconds and 2 git commands to generate.