]> git.pld-linux.org Git - packages/python-Xlib.git/blob - python-Xlib.spec
8145f05abd713c013eed71abc46b450f28690d79
[packages/python-Xlib.git] / python-Xlib.spec
1
2 %define         module  Xlib
3
4 Summary:        X client library for Python
5 Summary(pl.UTF-8):      Biblioteka klienta X dla Pythona
6 Name:           python-%{module}
7 Version:        0.14
8 Release:        2
9 License:        GPL
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
15 BuildRequires:  python
16 BuildRequires:  python-devel >= 1:2.3
17 BuildRequires:  rpm-pythonprov
18 %pyrequires_eq  python-modules
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
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.
27
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.
33
34 There are three advantages of choosing to implement a pure Python
35 library:
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.
41
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.
48
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.
54
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.
62
63 %prep
64 %setup -q -n python-xlib-%{version}
65
66 %build
67 %py_build
68
69 %install
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}
74 %py_install
75
76 find $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/ -name \*.py | xargs rm
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files
82 %defattr(644,root,root,755)
83 %doc NEWS README TODO
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
99 %endif
This page took 0.054856 seconds and 2 git commands to generate.