1 # TODO make examples package
3 %define module egenix-mx-base
4 %define mxdir %{py_sitedir}/mx
6 Summary: eGenix mx-Extensions for Python
7 Summary(pl.UTF-8): eGenix mx-Extensions dla języka Python
11 License: distributable
12 Group: Libraries/Python
13 #Source0Download: http://www.egenix.com/files/python/eGenix-mx-Extensions.html
14 Source0: http://www.egenix.com/files/python/%{module}-%{version}.tar.gz
15 # Source0-md5: 66841151728a06f92d0b8dd2ed317a29
16 URL: http://www.egenix.com/files/python/eGenix-mx-Extensions.html
17 BuildRequires: python-devel >= 2.2.2
18 BuildRequires: rpm-pythonprov
19 %pyrequires_eq python-libs
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 The eGenix mx Extension Series are a collection of Python extensions
24 written in ANSI C and Python which provide a large spectrum of useful
25 additions to everyday Python programming.
27 This package includes the Open Source subpackages of the series and is
28 needed by all other add-on packages of the series.
30 %description -l pl.UTF-8
31 eGenix mx Extensions Series jest zestawem modułów, ułatwiających życie
32 każdemu programiście piszącemu w języku Python, napisanych w ANSI C i
35 Ten pakiet zawiera podstawowe moduły wymagane przez inne pakiety.
38 Summary: Basic header files for eGenix extensions
39 Summary(pl.UTF-8): Podstawowe pliki nagłówkowe dla rozszerzeń eGenix
40 Group: Development/Languages/Python
41 Requires: %{name} = %{version}-%{release}
44 Basic header files for eGenix extensions.
46 %description devel -l pl.UTF-8
47 Podstawowe pliki nagłówkowe dla rozszerzeń eGenix.
49 %package -n python-mx-BeeBase
50 Summary: High performance construction kit for disk based indexed databases (B+Tree)
51 Summary(pl.UTF-8): Wysokiej jakości pakiet do tworzenia indeksowanych baz danych (B+Tree)
52 Group: Libraries/Python
53 Requires: %{name} = %{version}-%{release}
55 %description -n python-mx-BeeBase
56 mxBeeBase is a high performance construction kit for disk based
57 indexed databases. It offers components which you can plug together to
58 easily build your own custom mid-sized databases (the current size
59 limit is sizeof(long) which gives you an address range of around 2GB
62 The two basic building blocks in mxBeeBase are storage and index.
63 Storage is implemented as variable record length data storage with
64 integrated data protection features, automatic data recovery and
65 locking for multi process access. Indexes use a high performance
66 optimized B+Tree implementation built on top of Thomas Niemann's
67 Cookbook B+Tree implementation.
69 %description -n python-mx-BeeBase -l pl.UTF-8
70 mxBeeBase jest wysokiej jakości pakietem do tworzenia indeksowanych
71 baz danych. Zawiera komponenty, które można razem łączyć w celu
72 zbudowania własnej bazy. Obecny limit ilości danych wynosi 2GB (max.
73 wartość liczby całkowitej typu long na platformach 32 bitowych).
75 Dwoma podstawowymi komponentami w tym pakiecie są indeksy oraz
76 rekordy. Rekord może być zmiennej długości i zawiera mechanizmy
77 ochrony, automatycznego odzyskiwania, blokowania, a także
78 wieloprocesowego dostępu do danych. Do indeksowania są używane bardzo
79 wydajne B-drzewa zaimplementowane na podstawie Cookbook B+Tree Thomasa
82 %package -n python-mx-DateTime
83 Summary: Date and time Python extension
84 Summary(pl.UTF-8): Obiekty daty i czasu dla języka Python
85 Group: Libraries/Python
86 Requires: %{name} = %{version}-%{release}
88 %description -n python-mx-DateTime
89 mxDateTime is an extension package that provides three new object
90 types - DateTime, DateTimeDelta and RelativeDateTime, which let you
91 store and handle date/time values in a much more natural way than by
92 using ticks (seconds since 01.01.1970 0:00 UTC; the encoding used by
95 You can add, subtract and even multiply instances, pickle and copy
96 them and convert the results to strings, COM dates, ticks and some
97 other more esoteric values. In addition, there are several convenient
98 constructors and formatters at hand to greatly simplify dealing with
99 dates and times in real-world applications.
101 In addition to providing an easy-to-use Python interface the package
102 also exports a comfortable C API interface for other extensions to
103 build upon. This is especially interesting for database applications
104 which often have to deal with date/time values (the mxODBC package is
105 one example of an extension using this interface).
107 %description -n python-mx-DateTime -l pl.UTF-8
108 mxDateTime jest pakietem modułów, które definiują trzy nowe klasy -
109 DateTime, DateTimeDelta oraz RelativeDateTime. Umożliwiają one
110 przechowywanie oraz operowanie na dacie i czasie w bardziej naturalny
111 sposób niż za pomocą sekund od początku 1 stycznia 1970 (tak jak w
114 Programista może dodawać, odejmować, mnożyć (w sensie arytmetycznym),
115 serializować, a także mnożyć (w sesnie rozmnażania :-) obiekty.
116 Instancje w/w klas mogą być konwertowane do napisów i sekund.
117 Dodatkowo moduł zawiera kilka użytecznych funkcji do tworzenia nowych
118 obiektów i ich formatowania.
120 Oprócz, łatwych w użyciu, klas języka Python, pakiet dostarcza także
121 bardzo wygodny interfejs w C, który może być wykorzystany do tworzenia
122 innych rozszerzeń (np.: pakiet mxODBC). W szczególności, cecha ta jest
123 interesująca w przypadku aplikacji bazodanowych, które operują na
126 %package -n python-mx-DateTime-devel
127 Summary: Header file for DateTime Python extension
128 Summary(pl.UTF-8): Plik nagłówkowy rozszerzenia DateTime dla Pythona
129 Group: Development/Languages/Python
130 Requires: %{name}-devel = %{version}-%{release}
132 %description -n python-mx-DateTime-devel
133 Header file for DateTime Python extension.
135 %description -n python-mx-DateTime-devel -l pl.UTF-8
136 Plik nagłówkowy rozszerzenia DateTime dla Pythona.
138 %package -n python-mx-Proxy
139 Summary: Support for Bastion like implementations for Python
140 Summary(pl.UTF-8): Wsparcie dla implementacji typu Bastion dla języka Python
141 Group: Libraries/Python
142 Requires: %{name} = %{version}-%{release}
144 %description -n python-mx-Proxy
145 mxProxy is an extension package that provides a new type that is
146 suitable to implement Bastion like features without the need to use
147 restricted execution environments.
149 The type's main features are secure data encapsulation (the hidden
150 objects are not accessible from Python since they are stored in
151 internal C structures), customizable attribute lookup methods and a
152 cleanup protocol that helps in breaking circular references prior to
155 The latest version adds a very interesting new feature: weak
156 references which help you work with circular references in a way that
157 doesn't cause memory leakage in a Python system.
159 %description -n python-mx-Proxy -l pl.UTF-8
160 Pakiet mxProxy dostarcza nowe klasy, które implementują funkcjonalność
161 typu Bastion bez potrzeby ograniczania środowiska, w którym jest
162 wykonywana aplikacja.
164 Podstawowymi zaletami są: bezpieczne obudowywanie danych (ukryte
165 obiekty nie są dostępne z poziomu Pythona, ponieważ są one
166 przechowywane w wewnętrznych strukturach języka C), konfigurowalne
167 metody do pobierania wartości atrybutów oraz protokół, który pomaga w
168 rozbijaniu zapętlonych referencji podczas usuwania obiektów.
170 Ostatnia wersja pakietu implementuje tzw. słabe referencje, które nie
171 powodują wycieków pamięci w przypadku referencji zapętlonych.
173 %package -n python-mx-Queue
174 Summary: Queue implementation for Python
175 Summary(pl.UTF-8): Implementacja kolejki dla języka Python
176 Group: Libraries/Python
177 Requires: %{name} = %{version}-%{release}
179 %description -n python-mx-Queue
180 mxQueue is an extension package that provides a new object type called
181 Queue. It works much like what you would expect from such a type,
182 having .push() and .pop() methods and focusses on obtaining maximum
183 speed at low memory costs.
185 %description -n python-mx-Queue -l pl.UTF-8
186 Pakiet mxQueue zawiera implementację kolejki, która zawiera typowe
187 metody takie jak pop() czy push(). Mechanizm został napisany tak by,
188 przy minimalnym zużyciu pamięci, był bardzo wydajny.
190 %package -n python-mx-Stack
191 Summary: Stack implementation for Python
192 Summary(pl.UTF-8): Implementacja stosu dla języka Python
193 Group: Libraries/Python
194 Requires: %{name} = %{version}-%{release}
196 %description -n python-mx-Stack
197 mxStack is an extension package that provides a new object type called
198 Stack. It works much like what you would expect from such a type,
199 having .push() and .pop() methods and focusses on obtaining maximum
200 speed at low memory costs.
202 %description -n python-mx-Stack -l pl.UTF-8
203 Pakiet mxStack zawiera implementację stosu, która zawiera typowe
204 metody takie jak pop() czy push(). Mechanizm został napisany tak by,
205 przy minimalnym zużyciu pamięci, był bardzo wydajny.
207 %package -n python-mx-TextTools
208 Summary: Efficient text manipulation extensions for Python
209 Summary(pl.UTF-8): Wydajne manipulowanie tekstem w języku Python
210 Group: Libraries/Python
211 Requires: %{name} = %{version}-%{release}
213 %description -n python-mx-TextTools
214 mxTextTools is an extension package for Python that provides several
215 useful functions and types that implement high-performance text
216 manipulation and searching algorithms in addition to a very flexible
217 and extendable state machine, the Tagging Engine, that allows scanning
218 and processing text based on low-level byte-code "programs" written
219 using Python tuples. It gives you access to the speed of C without the
220 need to do any compile and link steps every time you change the
223 Applications include parsing structured text, finding and extracting
224 text (either exact or using translation tables) and recombining
225 strings to form new text.
227 %description -n python-mx-TextTools -l pl.UTF-8
228 Pakiet mxTextTools dostarcza szereg użytecznych typów i funkcji, które
229 implementują wysokiej jakości algorytmy do wyszukiwania i manipulacji
230 tekstu. Programista dostaje wydajne (na poziomie kodu napisanego w
231 języku C) narzędzie bez potrzeby kompilacji i konsolidacji, kiedy
232 zajdzie potrzeba zmiany sposobu interpretacji tekstu.
234 Pakiet może mieć zastosowanie w aplikacjach, które muszą interpretować
235 tekst zadany w konkretnym formacie, a także wyszukiwać, pobierać i
238 %package -n python-mx-Tools
239 Summary: Some handy functions and objects which provides new builtins for Python
240 Summary(pl.UTF-8): Kilka użytecznych klas i funkcji w postaci wew. mechanizmów Pythona
241 Group: Libraries/Python
242 Requires: %{name} = %{version}-%{release}
244 %description -n python-mx-Tools
245 mxTools is an extension package that includes a collection of handy
246 functions and objects giving additional functionality in form of new
247 builtins to the Python programmer.
249 The package auto-installs the new functions and objects as builtins
250 upon first import. This means that they become instantely available to
251 all other modules without any further action on your part. Add the
252 line import mx.Tools.NewBuiltins to your site.py script and they will
253 be available to all users at your site as if they were installed in
254 the Python interpreter itself.
256 %description -n python-mx-Tools -l pl.UTF-8
257 Pakiet mxTools zawiera kilka użytecznych klas i funkcji, które dają
258 więcej możliwości programiście, w postaci wewnętrznych mechanizmów
261 Pakiet ten instaluje, jako mechanizmy wewnętrzne Pythona, wszystkie
262 funkcje i klasy po ich pierwszym dołączeniu do kodu. Oznacza to, że są
263 one dostępne dla innych modułów bez jakichkolwiek dodatkowych
264 zabiegów. Wystarczy dodać linię "import mx.Tools.NewBuiltins" do
265 odpowiedniego skryptu (site.py) i zdefiniowane funkcje oraz klasy będą
266 widoczne dla wszystkich użytkowników tak, jak by były wbudowane w
270 %setup -q -n %{module}-%{version}
273 env CFLAGS="%{rpmcflags}" python setup.py build
276 rm -rf $RPM_BUILD_ROOT
277 install -d $RPM_BUILD_ROOT%{py_incdir}/mx
278 python setup.py install \
279 --root=$RPM_BUILD_ROOT \
280 --install-purelib=%{py_sitedir}
282 find $RPM_BUILD_ROOT%{py_sitedir} -name \*.h \
283 -exec mv {} $RPM_BUILD_ROOT%{py_incdir}/mx \;
284 find $RPM_BUILD_ROOT%{py_sitedir} -name '*.py' -o -regex '.*/\(COPYRIGHT\|LICENSE\|README\|Doc\|Examples\)' | xargs rm -rf
287 rm -rf $RPM_BUILD_ROOT
290 %defattr(644,root,root,755)
291 %doc README mx/LICENSE mx/COPYRIGHT mx/Doc/mxLicense.html
296 %{mxdir}/Misc/*.py[co]
299 %defattr(644,root,root,755)
300 %{py_incdir}/mx/mxh.h
302 %files -n python-mx-BeeBase
303 %defattr(644,root,root,755)
304 # this COPYRIGHT differs from others
305 %doc mx/BeeBase/Doc/*.html mx/BeeBase/COPYRIGHT
306 %dir %{mxdir}/BeeBase
307 %{mxdir}/BeeBase/*.py[co]
308 %dir %{mxdir}/BeeBase/mxBeeBase
309 %{mxdir}/BeeBase/mxBeeBase/*.py[co]
310 %attr(755,root,root) %{mxdir}/BeeBase/mxBeeBase/*.so
313 #%{py_incdir}/mx/btr.h
314 #%{py_incdir}/mx/mxBeeBase.h
316 %files -n python-mx-DateTime
317 %defattr(644,root,root,755)
318 %doc mx/DateTime/Doc/*.html
319 %dir %{mxdir}/DateTime
320 %{mxdir}/DateTime/*.py[co]
321 %dir %{mxdir}/DateTime/mxDateTime
322 %{mxdir}/DateTime/mxDateTime/*.py[co]
323 %attr(755,root,root) %{mxdir}/DateTime/mxDateTime/*.so
325 %files -n python-mx-DateTime-devel
326 %defattr(644,root,root,755)
327 %{py_incdir}/mx/mxDateTime.h
329 %files -n python-mx-Proxy
330 %defattr(644,root,root,755)
331 %doc mx/Proxy/Doc/*.html
333 %{mxdir}/Proxy/*.py[co]
334 %dir %{mxdir}/Proxy/mxProxy
335 %{mxdir}/Proxy/mxProxy/*.py[co]
336 %attr(755,root,root) %{mxdir}/Proxy/mxProxy/*.so
339 #%{py_incdir}/mx/mxProxy.h
341 %files -n python-mx-Queue
342 %defattr(644,root,root,755)
343 %doc mx/Queue/Doc/*.html
345 %{mxdir}/Queue/*.py[co]
346 %dir %{mxdir}/Queue/mxQueue
347 %{mxdir}/Queue/mxQueue/*.py[co]
348 %attr(755,root,root) %{mxdir}/Queue/mxQueue/*.so
351 #%{py_incdir}/mx/mxQueue.h
353 %files -n python-mx-Stack
354 %defattr(644,root,root,755)
355 %doc mx/Stack/Doc/*.html
357 %{mxdir}/Stack/*.py[co]
358 %dir %{mxdir}/Stack/mxStack
359 %{mxdir}/Stack/mxStack/*.py[co]
360 %attr(755,root,root) %{mxdir}/Stack/mxStack/*.so
362 %files -n python-mx-TextTools
363 %defattr(644,root,root,755)
364 %doc mx/TextTools/Doc/*.html
365 %dir %{mxdir}/TextTools
366 %{mxdir}/TextTools/*.py[co]
367 %dir %{mxdir}/TextTools/mxTextTools
368 %{mxdir}/TextTools/mxTextTools/*.py[co]
369 %attr(755,root,root) %{mxdir}/TextTools/mxTextTools/*.so
370 %dir %{mxdir}/TextTools/Constants
371 %{mxdir}/TextTools/Constants/*.py[co]
374 #%{py_incdir}/mx/mxTextTools.h
375 #%{py_incdir}/mx/mxbmse.h
376 #%{py_incdir}/mx/mxte.h
378 %files -n python-mx-Tools
379 %defattr(644,root,root,755)
380 %doc mx/Tools/Doc/*.html
382 %{mxdir}/Tools/*.py[co]
383 %dir %{mxdir}/Tools/mxTools
384 %{mxdir}/Tools/mxTools/*.py[co]
385 %attr(755,root,root) %{mxdir}/Tools/mxTools/*.so
388 #%{py_incdir}/mx/mxTools.h