]> git.pld-linux.org Git - packages/python-linecache2.git/blame - python-linecache2.spec
rebuild with python 3.10
[packages/python-linecache2.git] / python-linecache2.spec
CommitLineData
cb376a02 1# NOTE: linecache already in standard libraries since 2.?/3.?;
f9ea475f
JB
2# linecache 1.0.0 is equivalent of version from cpython 3.5.0 .. 3.7.0 (no changes in this range)
3# so the only point of providing linecache2 1.0.0 for python>=3.5.0 are external dependencies
cb376a02
JB
4#
5# Conditional build:
6%bcond_without python2 # CPython 2.x module
7%bcond_without python3 # CPython 3.x module
8%bcond_without tests # test target
9
10Summary: Backport of linecache to older supported Pythons
11Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
12Name: python-linecache2
13Version: 1.0.0
494152f2 14Release: 4
cb376a02 15License: MIT
d30594be 16Group: Development/Languages/Python
7f55efd6
JB
17#Source0Download: https://pypi.org/pypi/linecache2/
18Source0: https://files.pythonhosted.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
cb376a02
JB
19# Source0-md5: 7b25d0289ec36bff1f9e63c4329ce65c
20URL: https://github.com/testing-cabal/linecache2
21%if %{with python2}
22BuildRequires: python-devel >= 1:2.6
23%if %{with tests}
24BuildRequires: python-fixtures
25BuildRequires: python-unittest2
26%endif
27%endif
28%if %{with python3}
29BuildRequires: python3-devel >= 1:3.2
30%if %{with tests}
31BuildRequires: python3-fixtures
32BuildRequires: python3-unittest2
33%endif
34%endif
35BuildRequires: rpmbuild(macros) >= 1.710
36Requires: python-modules
37BuildArch: noarch
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41Backport of linecache to older supported Pythons.
42
43linecache module provides random access to text lines.
44
45%description -l pl.UTF-8
46Backport modułu linecache do starszych wersji Pythona.
47
48Moduł linecache pozwala na swobodny dostęp do linii tekstu.
49
50%package -n python3-linecache2
51Summary: Backport of linecache to older supported Pythons
52Summary(pl.UTF-8): Backport modułu linecache do starszych wersji Pythona
d30594be 53Group: Development/Languages/Python
cb376a02
JB
54Requires: python3-modules
55
56%description -n python3-linecache2
57Backport of linecache to older supported Pythons.
58
59linecache module provides random access to text lines.
60
61%description -n python3-linecache2 -l pl.UTF-8
62Backport modułu linecache do starszych wersji Pythona.
63
64Moduł linecache pozwala na swobodny dostęp do linii tekstu.
65
66%prep
67%setup -q -n linecache2-%{version}
68
69%build
70%if %{with python2}
71%py_build %{?with_tests:test}
72%endif
73
74%if %{with python3}
75%py3_build %{?with_tests:test}
76%endif
77
78%install
79rm -rf $RPM_BUILD_ROOT
80
81%if %{with python2}
82%py_install
83
84%py_postclean
85%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/linecache2/tests
86%endif
87
88%if %{with python3}
89%py3_install
90
91%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/linecache2/tests
92%endif
93
94%clean
95rm -rf $RPM_BUILD_ROOT
96
97%if %{with python2}
98%files
99%defattr(644,root,root,755)
100%doc AUTHORS ChangeLog README.rst
101%dir %{py_sitescriptdir}/linecache2
102%{py_sitescriptdir}/linecache2/*.py[co]
103%{py_sitescriptdir}/linecache2-%{version}-py*.egg-info
104%endif
105
106%if %{with python3}
107%files -n python3-linecache2
108%defattr(644,root,root,755)
109%doc AUTHORS ChangeLog README.rst
110%dir %{py3_sitescriptdir}/linecache2
111%{py3_sitescriptdir}/linecache2/*.py
112%{py3_sitescriptdir}/linecache2/__pycache__
113%{py3_sitescriptdir}/linecache2-%{version}-py*.egg-info
114%endif
This page took 0.081944 seconds and 4 git commands to generate.