]> git.pld-linux.org Git - packages/python-linecache2.git/blob - python-linecache2.spec
- better group
[packages/python-linecache2.git] / python-linecache2.spec
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
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
12 Version:        1.0.0
13 Release:        1
14 License:        MIT
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
20 %if %{with python2}
21 BuildRequires:  python-devel >= 1:2.6
22 %if %{with tests}
23 BuildRequires:  python-fixtures
24 BuildRequires:  python-unittest2
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-devel >= 1:3.2
29 %if %{with tests}
30 BuildRequires:  python3-fixtures
31 BuildRequires:  python3-unittest2
32 %endif
33 %endif
34 BuildRequires:  rpmbuild(macros) >= 1.710
35 Requires:       python-modules
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Backport of linecache to older supported Pythons.
41
42 linecache module provides random access to text lines.
43
44 %description -l pl.UTF-8
45 Backport modułu linecache do starszych wersji Pythona.
46
47 Moduł linecache pozwala na swobodny dostęp do linii tekstu.
48
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
54
55 %description -n python3-linecache2
56 Backport of linecache to older supported Pythons.
57
58 linecache module provides random access to text lines.
59
60 %description -n python3-linecache2 -l pl.UTF-8
61 Backport modułu linecache do starszych wersji Pythona.
62
63 Moduł 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
78 rm -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
94 rm -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.0581 seconds and 4 git commands to generate.