[packages/python-traceback2] - initial, requirement for other backports chain
qboosh
qboosh at pld-linux.org
Wed Mar 2 21:54:20 CET 2016
commit 73dd0a5f297f6abd9f00dfc5fa925a97b2364117
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Wed Mar 2 21:57:44 2016 +0100
- initial, requirement for other backports chain
python-traceback2.spec | 130 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 130 insertions(+)
---
diff --git a/python-traceback2.spec b/python-traceback2.spec
new file mode 100644
index 0000000..691926e
--- /dev/null
+++ b/python-traceback2.spec
@@ -0,0 +1,130 @@
+# NOTE: traceback is a part of standard library since 2.?/3.?
+# however, traceback2 supports unicode on python2
+#
+# Conditional build:
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+%bcond_without tests # test target
+
+Summary: Backport of traceback to older supported Pythons
+Summary(pl.UTF-8): Backport modułu traceback do starszych wersji Pythona
+Name: python-traceback2
+Version: 1.4.0
+Release: 1
+License: PSF
+Group: Development/Languages/Python
+#Source0Download: https://pypi.python.org/pypi/traceback2
+Source0: https://pypi.python.org/packages/source/t/traceback2/traceback2-%{version}.tar.gz
+# Source0-md5: 9e9723f4d70bfc6308fa992dd193c400
+URL: https://github.com/testing-cabal/traceback2
+%if %{with python2}
+BuildRequires: python-devel >= 1:2.6
+%if %{with tests}
+BuildRequires: python-contextlib2
+BuildRequires: python-fixtures
+BuildRequires: python-linecache2
+BuildRequires: python-testtools
+BuildRequires: python-unittest2
+%endif
+%endif
+%if %{with python3}
+BuildRequires: python3-devel >= 1:3.2
+%if %{with tests}
+BuildRequires: python3-contextlib2
+BuildRequires: python3-fixtures
+BuildRequires: python3-linecache2
+BuildRequires: python3-testtools
+BuildRequires: python3-unittest2
+%endif
+%endif
+BuildRequires: rpmbuild(macros) >= 1.710
+Requires: python-linecache2
+Requires: python-modules >= 1:2.6
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+traceback2 is a backport of traceback to older supported Pythons.
+
+traceback module is used to print or retrieve a stack traceback.
+
+In Python 2.x, unlike traceback, traceback2 creates unicode output
+(because it depends on the linecache2 module).
+
+%description -l pl.UTF-8
+traceback2 to backport modułu traceback do starszych wersji Pythona.
+
+Moduł traceback służy do wypisywania i odtwarzania śladu wywołań ze
+stosu.
+
+W Pythonei 2.x, w przeciwieństwie do modułu traceback, moduł
+traceback2 tworzy wyjście w unikodzie (ponieważ zależy od modułu
+linecache2).
+
+%package -n python3-traceback2
+Summary: Backport of traceback to older supported Pythons
+Summary(pl.UTF-8): Backport modułu traceback do starszych wersji Pythona
+Group: Development/Languages/Python
+Requires: python3-linecache2
+Requires: python3-modules >= 1:3.2
+
+%description -n python3-traceback2
+traceback2 is a backport of traceback to older supported Pythons.
+
+traceback module is used to print or retrieve a stack traceback.
+
+%description -n python3-traceback2 -l pl.UTF-8
+traceback2 to backport modułu traceback do starszych wersji Pythona.
+
+Moduł traceback służy do wypisywania i odtwarzania śladu wywołań ze
+stosu.
+
+%prep
+%setup -q -n traceback2-%{version}
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/traceback2/tests
+%endif
+
+%if %{with python3}
+%py3_install
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/traceback2/tests
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst
+%dir %{py_sitescriptdir}/traceback2
+%{py_sitescriptdir}/traceback2/*.py[co]
+%{py_sitescriptdir}/traceback2-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-traceback2
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README.rst
+%dir %{py3_sitescriptdir}/traceback2
+%{py3_sitescriptdir}/traceback2/*.py
+%{py3_sitescriptdir}/traceback2/__pycache__
+%{py3_sitescriptdir}/traceback2-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-traceback2.git/commitdiff/73dd0a5f297f6abd9f00dfc5fa925a97b2364117
More information about the pld-cvs-commit
mailing list