]> git.pld-linux.org Git - packages/python-Xlib.git/blob - python-Xlib.spec
4d21e6ceb3764184c379c78e1a345dfd83864ab5
[packages/python-Xlib.git] / python-Xlib.spec
1
2 %define         module  Xlib
3
4 Summary:        X client library for Python
5 Summary(pl):    Biblioteka klienta X dla Pythona
6 Name:           python-%{module}
7 Version:        0.12a
8 Release:        1
9 License:        GPL
10 Group:          Development/Languages/Python
11 Source0:        http://dl.sourceforge.net/python-xlib/python-xlib-%{version}.tar.gz
12 # Source0-md5:  4edc71320669e99ad874094bff44f4f8
13 URL:            http://python-xlib.sourceforge.net/
14 BuildRequires:  python-devel >= 1:2.3
15 BuildRequires:  rpm-pythonprov
16 %pyrequires_eq  python-modules
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 The Python X Library is intended to be a fully functional X client
22 library for Python programs. It is written entirely in Python, in
23 contrast to earlier X libraries for Python (the ancient X extension
24 and the newer plxlib) which were interfaces to the C Xlib.
25
26 This is possible to do since X client programs communicate with the X
27 server via the X protocol. The communication takes place over TCP/IP,
28 Unix sockets, DECnet or any other suitable streaming network protocol.
29 The C Xlib is merely an interface to this protocol, providing
30 functions suited for a C environment.
31
32 There are three advantages of choosing to implement a pure Python
33 library:
34 - Integration: The library can make use of the wonderful object system
35   in Python, providing an easy-to-use class hierarchy.
36 - Portability: The library will be usable on (almost) any computer
37   which have Python installed. A C interface could be problematic to
38   port to non-Unix systems, such as MS Windows or OpenVMS.
39
40 %description -l pl
41 Python X Library (biblioteka X dla Pythona) ma byæ w pe³ni
42 funkcjonaln± bibliotek± klienck± X dla programów w Pythonie. Jest
43 napisana ca³kowicie w Pythonie, w przeciwieñstwie do poprzednich
44 bibliotek X dla Pythona (starego rozszerzenia X i nowszej plxlib),
45 które by³y interfejsami do Xlib w C.
46
47 Jest to mo¿liwe do zrobienia poniewa¿ programy klienckie X komunikuj±
48 siê z X serwerem za pomoc± protoko³u X. Komunikacja odbywa siê poprzez
49 TCP/IP, gniazda uniksowe, DECnet lub dowolny inny strumieniowy
50 protokó³ sieciowy. Biblioteka Xlib w C jest jedynie interfejsem do
51 tego protoko³u, dostarczaj±c funkcje odpowiednie dla ¶rodowiska C.
52
53 S± trzy zalety wyboru implementacji jako czysto pythonowej biblioteki:
54 - integracja: biblioteka mo¿e u¿ywaæ cudownego systemu obiektowego
55   Pythona, dostarczaj±c ³atw± w u¿yciu hierarchiê klas
56 - przeno¶no¶æ: biblioteka bêdzie u¿yteczna na (prawie) ka¿dym
57   komputerze z zainstalowanym Pythonem. Interfejs w C móg³by byæ
58   problematyczny do sportowania na systemy nieuniksowe, jak na
59   przyk³ad MS Windows czy OpenVMS.
60
61 %prep
62 %setup -q -n python-xlib-%{version}
63
64 %build
65 python setup.py build
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{py_sitedir}
70 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
71 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72 python setup.py install \
73         --root=$RPM_BUILD_ROOT --optimize=2
74
75 find $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/ -name \*.py | xargs rm
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %files
81 %defattr(644,root,root,755)
82 %doc NEWS README TODO
83 %{py_sitescriptdir}/%{module}
84 %{_examplesdir}/%{name}-%{version}
This page took 0.061229 seconds and 2 git commands to generate.