]> git.pld-linux.org Git - SPECS.git/blob - python-text_file.spec
SPECS updated Mon 29 Apr 22:05:02 CEST 2024
[SPECS.git] / python-text_file.spec
1
2 %define         module  text_file
3
4 Summary:        Python module that simplifies text file processing
5 Summary(pl.UTF-8):      Moduł Pythona upraszczający przetwarzanie plików tekstowych
6 Name:           python-%{module}
7 Version:        1.0
8 Release:        4
9 License:        CNRI
10 Group:          Libraries/Python
11 Source0:        http://www.mems-exchange.org/software/files/%{module}/%{module}-%{version}.tar.gz
12 # Source0-md5:  de5e02741a0bf64635d0321eff635ee3
13 URL:            http://www.mems-exchange.org/software/text_file/
14 BuildRequires:  rpmbuild(macros) >= 1.710
15 BuildRequires:  python-devel >= 1:2.3
16 BuildRequires:  python-modules
17 BuildRequires:  rpm-pythonprov
18 Requires:       python >= 2.3
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 text_file.py is a Python module that provides the class TextFile,
24 instances of which are file-like objects that take care of many common
25 tasks needed when reading text files in the traditional Unix way:
26 strip comments, skip blank lines, join physical lines into logical
27 lines, strip trailing and/or leading whitespace, and collapse internal
28 whitespace. All of these are optional and independently controllable.
29 See the documentation in text_file.py for full details.
30
31 Note that TextFile objects do not have precisely the same semantics as
32 Python file objects, so they are not 100% compatible with each other.
33 See the class documentation for details.
34
35 %description -l pl.UTF-8
36 test_file.py jest modułem Pythona udostępniającym klasę TextFile,
37 której instancje są obiektami podobnymi do pythonowych obiektów file.
38 Klasa TextFile w sposób przezroczysty odpowiada za przeprowadzanie
39 użytecznych i znanych w środowisku uniksowym operacji podczas czytania
40 plików tekstowych: łączenie linii fizycznych w logiczne, usuwanie
41 początkowych i/lub końcowych białych znaków oraz wewnętrzne
42 redukowanie białych znaków. Wszystkie z tych operacji są opcjonalne i
43 niezależnie konfigurowalne. Dokumentacja modułu umieszczona jest
44 bezpośrednio w pliku text_file.py.
45
46 Należy zauważyć, iż obiekty TextFile nie mają semantyki zgodnej z
47 obiektami file Pythona, nie są więc w stu procentach kompatybilne z
48 innymi modułami udostępniającymi podobną funkcjonalność. Szczegóły
49 opisane są w dokumentacji klasy.
50
51 %prep
52 %setup -q -n %{module}-%{version}
53
54 %build
55 python setup.py build_ext
56
57 %install
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT%{py_sitescriptdir}
60
61 %py_install \
62         --install-lib=%{py_sitescriptdir} \
63         --optimize=2
64
65 find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm {} \;
66
67 %clean
68 rm -rf $RPM_BUILD_ROOT
69
70 %files
71 %defattr(644,root,root,755)
72 %doc README
73 %{py_sitescriptdir}/text_file.py[oc]
This page took 0.786814 seconds and 3 git commands to generate.