4 Summary: X client library for Python
5 Summary(pl.UTF-8): Biblioteka klienta X dla Pythona
10 Group: Development/Languages/Python
11 Source0: http://downloads.sourceforge.net/python-xlib/python-xlib-%{version}.tar.gz
12 # Source0-md5: a038c2f410d8445f3fa8f6dcd45659c5
13 URL: http://python-xlib.sourceforge.net/
14 BuildRequires: rpmbuild(macros) >= 1.710
16 BuildRequires: python-devel >= 1:2.3
17 BuildRequires: rpm-pythonprov
18 %pyrequires_eq python-modules
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The Python X Library is intended to be a fully functional X client
24 library for Python programs. It is written entirely in Python, in
25 contrast to earlier X libraries for Python (the ancient X extension
26 and the newer plxlib) which were interfaces to the C Xlib.
28 This is possible to do since X client programs communicate with the X
29 server via the X protocol. The communication takes place over TCP/IP,
30 Unix sockets, DECnet or any other suitable streaming network protocol.
31 The C Xlib is merely an interface to this protocol, providing
32 functions suited for a C environment.
34 There are three advantages of choosing to implement a pure Python
36 - Integration: The library can make use of the wonderful object system
37 in Python, providing an easy-to-use class hierarchy.
38 - Portability: The library will be usable on (almost) any computer
39 which have Python installed. A C interface could be problematic to
40 port to non-Unix systems, such as MS Windows or OpenVMS.
42 %description -l pl.UTF-8
43 Python X Library (biblioteka X dla Pythona) ma być w pełni
44 funkcjonalną biblioteką kliencką X dla programów w Pythonie. Jest
45 napisana całkowicie w Pythonie, w przeciwieństwie do poprzednich
46 bibliotek X dla Pythona (starego rozszerzenia X i nowszej plxlib),
47 które były interfejsami do Xlib w C.
49 Jest to możliwe do zrobienia ponieważ programy klienckie X komunikują
50 się z X serwerem za pomocą protokołu X. Komunikacja odbywa się poprzez
51 TCP/IP, gniazda uniksowe, DECnet lub dowolny inny strumieniowy
52 protokół sieciowy. Biblioteka Xlib w C jest jedynie interfejsem do
53 tego protokołu, dostarczając funkcje odpowiednie dla środowiska C.
55 Są trzy zalety wyboru implementacji jako czysto pythonowej biblioteki:
56 - integracja: biblioteka może używać cudownego systemu obiektowego
57 Pythona, dostarczając łatwą w użyciu hierarchię klas
58 - przenośność: biblioteka będzie użyteczna na (prawie) każdym
59 komputerze z zainstalowanym Pythonem. Interfejs w C mógłby być
60 problematyczny do sportowania na systemy nieuniksowe, jak na przykład
61 MS Windows czy OpenVMS.
64 %setup -q -n python-xlib-%{version}
70 rm -rf $RPM_BUILD_ROOT
71 install -d $RPM_BUILD_ROOT%{py_sitedir}
72 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73 install examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
76 find $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/ -name \*.py | xargs rm
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %dir %{py_sitescriptdir}/%{module}
85 %{py_sitescriptdir}/%{module}/*.py[co]
86 %dir %{py_sitescriptdir}/%{module}/ext
87 %{py_sitescriptdir}/%{module}/ext/*.py[co]
88 %dir %{py_sitescriptdir}/%{module}/keysymdef
89 %{py_sitescriptdir}/%{module}/keysymdef/*.py[co]
90 %dir %{py_sitescriptdir}/%{module}/protocol
91 %{py_sitescriptdir}/%{module}/protocol/*.py[co]
92 %dir %{py_sitescriptdir}/%{module}/support
93 %{py_sitescriptdir}/%{module}/support/*.py[co]
94 %dir %{py_sitescriptdir}/%{module}/xobject
95 %{py_sitescriptdir}/%{module}/xobject/*.py[co]
96 %{_examplesdir}/%{name}-%{version}
97 %if "%{py_ver}" > "2.4"
98 %{py_sitescriptdir}/python_xlib-0.12-py*.egg-info