]> git.pld-linux.org Git - packages/python-linecache2.git/blame - python-linecache2.spec
- initial, requirement for other backports chain
[packages/python-linecache2.git] / python-linecache2.spec
CommitLineData
cb376a02
JB
1# NOTE: linecache already in standard libraries since 2.?/3.?;
2# 3.5 has even more functionality than linecache2 1.0.0 (lazycache() function)
3#
4# Conditional build:
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7%bcond_without tests # test target
8
9Summary: Backport of linecache to older supported Pythons
10Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
11Name: python-linecache2
12Version: 1.0.0
13Release: 1
14License: MIT
15Group: Development/Tools
16#Source0Download: https://pypi.python.org/pypi/linecache2
17Source0: https://pypi.python.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
18# Source0-md5: 7b25d0289ec36bff1f9e63c4329ce65c
19URL: https://github.com/testing-cabal/linecache2
20%if %{with python2}
21BuildRequires: python-devel >= 1:2.6
22%if %{with tests}
23BuildRequires: python-fixtures
24BuildRequires: python-unittest2
25%endif
26%endif
27%if %{with python3}
28BuildRequires: python3-devel >= 1:3.2
29%if %{with tests}
30BuildRequires: python3-fixtures
31BuildRequires: python3-unittest2
32%endif
33%endif
34BuildRequires: rpmbuild(macros) >= 1.710
35Requires: python-modules
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Backport of linecache to older supported Pythons.
41
42linecache module provides random access to text lines.
43
44%description -l pl.UTF-8
45Backport modułu linecache do starszych wersji Pythona.
46
47Moduł linecache pozwala na swobodny dostęp do linii tekstu.
48
49%package -n python3-linecache2
50Summary: Backport of linecache to older supported Pythons
51Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
52Group: Development/Tools
53Requires: python3-modules
54
55%description -n python3-linecache2
56Backport of linecache to older supported Pythons.
57
58linecache module provides random access to text lines.
59
60%description -n python3-linecache2 -l pl.UTF-8
61Backport modułu linecache do starszych wersji Pythona.
62
63Moduł linecache pozwala na swobodny dostęp do linii tekstu.
64
65%prep
66%setup -q -n linecache2-%{version}
67
68%build
69%if %{with python2}
70%py_build %{?with_tests:test}
71%endif
72
73%if %{with python3}
74%py3_build %{?with_tests:test}
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
81%py_install
82
83%py_postclean
84%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/linecache2/tests
85%endif
86
87%if %{with python3}
88%py3_install
89
90%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/linecache2/tests
91%endif
92
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%files
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
103%endif
104
105%if %{with python3}
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
113%endif
This page took 0.10021 seconds and 4 git commands to generate.