1 # NOTE: linecache already in standard libraries since 2.?/3.?;
2 # 3.5 has even more functionality than linecache2 1.0.0 (lazycache() function)
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
7 %bcond_without tests # test target
9 Summary: Backport of linecache to older supported Pythons
10 Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
11 Name: python-linecache2
15 Group: Development/Languages/Python
16 #Source0Download: https://pypi.python.org/pypi/linecache2
17 Source0: https://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
18 # Source0-md5: 7b25d0289ec36bff1f9e63c4329ce65c
19 URL: https://github.com/testing-cabal/linecache2
21 BuildRequires: python-devel >= 1:2.6
23 BuildRequires: python-fixtures
24 BuildRequires: python-unittest2
28 BuildRequires: python3-devel >= 1:3.2
30 BuildRequires: python3-fixtures
31 BuildRequires: python3-unittest2
34 BuildRequires: rpmbuild(macros) >= 1.710
35 Requires: python-modules
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 Backport of linecache to older supported Pythons.
42 linecache module provides random access to text lines.
44 %description -l pl.UTF-8
45 Backport modułu linecache do starszych wersji Pythona.
47 Moduł linecache pozwala na swobodny dostęp do linii tekstu.
49 %package -n python3-linecache2
50 Summary: Backport of linecache to older supported Pythons
51 Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
52 Group: Development/Languages/Python
53 Requires: python3-modules
55 %description -n python3-linecache2
56 Backport of linecache to older supported Pythons.
58 linecache module provides random access to text lines.
60 %description -n python3-linecache2 -l pl.UTF-8
61 Backport modułu linecache do starszych wersji Pythona.
63 Moduł linecache pozwala na swobodny dostęp do linii tekstu.
66 %setup -q -n linecache2-%{version}
70 %py_build %{?with_tests:test}
74 %py3_build %{?with_tests:test}
78 rm -rf $RPM_BUILD_ROOT
84 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/linecache2/tests
90 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/linecache2/tests
94 rm -rf $RPM_BUILD_ROOT
98 %defattr(644,root,root,755)
99 %doc AUTHORS ChangeLog README.rst
100 %dir %{py_sitescriptdir}/linecache2
101 %{py_sitescriptdir}/linecache2/*.py[co]
102 %{py_sitescriptdir}/linecache2-%{version}-py*.egg-info
106 %files -n python3-linecache2
107 %defattr(644,root,root,755)
108 %doc AUTHORS ChangeLog README.rst
109 %dir %{py3_sitescriptdir}/linecache2
110 %{py3_sitescriptdir}/linecache2/*.py
111 %{py3_sitescriptdir}/linecache2/__pycache__
112 %{py3_sitescriptdir}/linecache2-%{version}-py*.egg-info