]> git.pld-linux.org Git - packages/python-linecache2.git/blob - python-linecache2.spec
- enhanced comment
[packages/python-linecache2.git] / python-linecache2.spec
1 # NOTE: linecache already in standard libraries since 2.?/3.?;
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
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
10 Summary:        Backport of linecache to older supported Pythons
11 Summary(pl.UTF-8):      Backport modułu linecache do starszych wersji Pythona
12 Name:           python-linecache2
13 Version:        1.0.0
14 Release:        1
15 License:        MIT
16 Group:          Development/Languages/Python
17 #Source0Download: https://pypi.org/pypi/linecache2/
18 Source0:        https://files.pythonhosted.org/packages/source/l/linecache2/linecache2-%{version}.tar.gz
19 # Source0-md5:  7b25d0289ec36bff1f9e63c4329ce65c
20 URL:            https://github.com/testing-cabal/linecache2
21 %if %{with python2}
22 BuildRequires:  python-devel >= 1:2.6
23 %if %{with tests}
24 BuildRequires:  python-fixtures
25 BuildRequires:  python-unittest2
26 %endif
27 %endif
28 %if %{with python3}
29 BuildRequires:  python3-devel >= 1:3.2
30 %if %{with tests}
31 BuildRequires:  python3-fixtures
32 BuildRequires:  python3-unittest2
33 %endif
34 %endif
35 BuildRequires:  rpmbuild(macros) >= 1.710
36 Requires:       python-modules
37 BuildArch:      noarch
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %description
41 Backport of linecache to older supported Pythons.
42
43 linecache module provides random access to text lines.
44
45 %description -l pl.UTF-8
46 Backport modułu linecache do starszych wersji Pythona.
47
48 Moduł linecache pozwala na swobodny dostęp do linii tekstu.
49
50 %package -n python3-linecache2
51 Summary:        Backport of linecache to older supported Pythons
52 Summary(pl.UTF-8):      Backport modułu linecache do starszych wersji Pythona
53 Group:          Development/Languages/Python
54 Requires:       python3-modules
55
56 %description -n python3-linecache2
57 Backport of linecache to older supported Pythons.
58
59 linecache module provides random access to text lines.
60
61 %description -n python3-linecache2 -l pl.UTF-8
62 Backport modułu linecache do starszych wersji Pythona.
63
64 Moduł 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
79 rm -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
95 rm -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.231937 seconds and 3 git commands to generate.