4 Summary: X client library for Python
5 Summary(pl): Biblioteka klienta X dla Pythona
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
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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.
32 There are three advantages of choosing to implement a pure Python
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.
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.
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.
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.
62 %setup -q -n python-xlib-%{version}
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
75 find $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/ -name \*.py | xargs rm
78 rm -rf $RPM_BUILD_ROOT
81 %defattr(644,root,root,755)
83 %{py_sitescriptdir}/%{module}
84 %{_examplesdir}/%{name}-%{version}