]> git.pld-linux.org Git - packages/python-traceback2.git/blob - python-traceback2.spec
788fbf6d40fd8adcf8db6b63d1c33b702eeee691
[packages/python-traceback2.git] / python-traceback2.spec
1 # NOTE: traceback is a part of standard library since 2.?/3.?
2 #       however, traceback2 supports unicode on python2
3 #       traceback2 1.4.0 is backport of traceback between 3.4.0/3.5.0
4 #       traceback from cpython>=3.5.0 is more robust
5 #
6 # Conditional build:
7 %bcond_without  python2 # CPython 2.x module
8 %bcond_without  python3 # CPython 3.x module
9 %bcond_without  tests   # test target
10
11 Summary:        Backport of traceback to older supported Pythons
12 Summary(pl.UTF-8):      Backport modułu traceback do starszych wersji Pythona
13 Name:           python-traceback2
14 Version:        1.4.0
15 Release:        5
16 License:        PSF
17 Group:          Development/Languages/Python
18 #Source0Download: https://pypi.org/simple/traceback2
19 Source0:        https://files.pythonhosted.org/packages/source/t/traceback2/traceback2-%{version}.tar.gz
20 # Source0-md5:  9e9723f4d70bfc6308fa992dd193c400
21 URL:            https://github.com/testing-cabal/traceback2
22 %if %{with python2}
23 BuildRequires:  python-devel >= 1:2.6
24 %if %{with tests}
25 BuildRequires:  python-contextlib2
26 BuildRequires:  python-fixtures
27 BuildRequires:  python-linecache2
28 BuildRequires:  python-testtools
29 BuildRequires:  python-unittest2
30 %endif
31 %endif
32 %if %{with python3}
33 BuildRequires:  python3-devel >= 1:3.2
34 %if %{with tests}
35 BuildRequires:  python3-contextlib2
36 BuildRequires:  python3-fixtures
37 BuildRequires:  python3-linecache2
38 BuildRequires:  python3-testtools
39 BuildRequires:  python3-unittest2
40 %endif
41 %endif
42 BuildRequires:  rpmbuild(macros) >= 1.714
43 Requires:       python-modules >= 1:2.6
44 BuildArch:      noarch
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 traceback2 is a backport of traceback to older supported Pythons.
49
50 traceback module is used to print or retrieve a stack traceback.
51
52 In Python 2.x, unlike traceback, traceback2 creates unicode output
53 (because it depends on the linecache2 module).
54
55 %description -l pl.UTF-8
56 traceback2 to backport modułu traceback do starszych wersji Pythona.
57
58 Moduł traceback służy do wypisywania i odtwarzania śladu wywołań ze
59 stosu.
60
61 W Pythonie 2.x, w przeciwieństwie do modułu traceback, moduł
62 traceback2 tworzy wyjście w unikodzie (ponieważ zależy od modułu
63 linecache2).
64
65 %package -n python3-traceback2
66 Summary:        Backport of traceback to older supported Pythons
67 Summary(pl.UTF-8):      Backport modułu traceback do starszych wersji Pythona
68 Group:          Development/Languages/Python
69 Requires:       python3-modules >= 1:3.2
70
71 %description -n python3-traceback2
72 traceback2 is a backport of traceback to older supported Pythons.
73
74 traceback module is used to print or retrieve a stack traceback.
75
76 %description -n python3-traceback2 -l pl.UTF-8
77 traceback2 to backport modułu traceback do starszych wersji Pythona.
78
79 Moduł traceback służy do wypisywania i odtwarzania śladu wywołań ze
80 stosu.
81
82 %prep
83 %setup -q -n traceback2-%{version}
84
85 %build
86 %if %{with python2}
87 %py_build %{?with_tests:test}
88 %endif
89
90 %if %{with python3}
91 %py3_build %{?with_tests:test}
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96
97 %if %{with python2}
98 %py_install
99
100 %py_postclean
101 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/traceback2/tests
102 %endif
103
104 %if %{with python3}
105 %py3_install
106
107 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/traceback2/tests
108 %endif
109
110 %clean
111 rm -rf $RPM_BUILD_ROOT
112
113 %if %{with python2}
114 %files
115 %defattr(644,root,root,755)
116 %doc AUTHORS ChangeLog README.rst
117 %dir %{py_sitescriptdir}/traceback2
118 %{py_sitescriptdir}/traceback2/*.py[co]
119 %{py_sitescriptdir}/traceback2-%{version}-py*.egg-info
120 %endif
121
122 %if %{with python3}
123 %files -n python3-traceback2
124 %defattr(644,root,root,755)
125 %doc AUTHORS ChangeLog README.rst
126 %dir %{py3_sitescriptdir}/traceback2
127 %{py3_sitescriptdir}/traceback2/*.py
128 %{py3_sitescriptdir}/traceback2/__pycache__
129 %{py3_sitescriptdir}/traceback2-%{version}-py*.egg-info
130 %endif
This page took 0.048281 seconds and 2 git commands to generate.