+# TODO make examples package
-%define module egenix-mx-base
-%define python_sitepkgsdir %(echo `python -c "import sys; print (sys.prefix + '/lib/python' + sys.version[:3] + '/site-packages/')"`)
-%define mxdir %{python_sitepkgsdir}/mx
+%define module egenix-mx-base
+%define mxdir %{py_sitedir}/mx
+#%%define beta_num 5
+#%%define fn_sufix 0b%{beta_num}
Summary: eGenix mx-Extensions for Python
Summary(pl): eGenix mx-Extensions dla jêzyka Python
Name: python-%{module}
-Version: 2.0.1
-Release: 1
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-License: Distributable
-Source0: http://www.lemburg.com/python/%{module}-%{version}.tar.gz
-URL: http://www.lemburg.com/python/eGenix-mx-Extensions.html
-BuildRequires: python-devel >= 2.1
-%requires_eq python
+Version: 2.0.5
+Release: 9
+License: distributable
+Group: Libraries/Python
+# Source0: http://www.egenix.com/files/python/%{module}-%{version}.%{fn_sufix}.tar.gz
+Source0: http://www.egenix.com/files/python/%{module}-%{version}.tar.gz
+# Source0-md5: a793a8fd2d5f646a2fb683d2d967a16b
+# URL: http://www.lemburg.com/python/eGenix-mx-Extensions.html
+URL: http://www.egenix.com/mailman-archives/egenix-users/2002-August/000078.html
+BuildRequires: python
+BuildRequires: python-devel >= 2.2.2
+BuildRequires: python-modules >= 2.2.2
+BuildRequires: rpm-pythonprov
+%pyrequires_eq python
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Ten pakiet zawiera podstawowe modu³y wymagane przez inne pakiety.
+%package devel
+Summary: Basic header files for eGenix extensions
+Summary(pl): Podstawowe pliki nag³ówkowe dla rozszerzeñ eGenix
+Group: Development/Languages/Python
+
+%description devel
+Basic header files for eGenix extensions.
+
+%description devel -l pl
+Podstawowe pliki nag³ówkowe dla rozszerzeñ eGenix.
+
%package -n python-mx-DateTime
Summary: Date and time Python extension
Summary(pl): Obiekty daty i czasu dla jêzyka Python
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-DateTime
mxDateTime is an extension package that provides three new object
which often have to deal with date/time values (the mxODBC package is
one example of an extension using this interface).
-%description -l pl -n python-mx-DateTime
+%description -n python-mx-DateTime -l pl
mxDateTime jest pakietem modu³ów, które definiuj± trzy nowe klasy -
DateTime, DateTimeDelta oraz RelativeDateTime. Umo¿liwiaj± one
przechowywanie oraz operowanie na dacie i czasie w bardziej naturalny
interesuj±ca w przypadku aplikacji bazodanowych, które operuj± na
dacie i czasie.
+%package -n python-mx-DateTime-devel
+Summary: Headers for date and time Python extension
+Summary(pl): Nag³ówki modu³ów daty i czasu
+Group: Development/Languages/Python
+Requires: %{name}-devel = %{version}-%{release}
+
+%description -n python-mx-DateTime-devel
+Headers for date and time Python extension.
+
+%description -n python-mx-DateTime-devel -l pl
+Nag³ówki dla modu³ów daty i czasu.
+
%package -n python-mx-TextTools
Summary: Efficient text manipulation extensions for Python
Summary(pl): Wydajne manipulowanie tekstem w jêzyku Python
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-TextTools
mxTextTools is an extension package for Python that provides several
text (either exact or using translation tables) and recombining
strings to form new text.
-%description -l pl -n python-mx-TextTools
+%description -n python-mx-TextTools -l pl
Pakiet mxTextTools dostarcza szereg u¿ytecznych typów i funkcji, które
implementuj± wysokiej jako¶ci algorytmy do wyszukiwania i manipulacji
tekstu. Programista dostaje wydajne (na poziomie kodu napisanego w
%package -n python-mx-Stack
Summary: Stack implementation for Python
Summary(pl): Implementacja stosu dla jêzyka Python
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-Stack
mxStack is an extension package that provides a new object type called
having .push() and .pop() methods and focusses on obtaining maximum
speed at low memory costs.
-%description -l pl -n python-mx-Stack
+%description -n python-mx-Stack -l pl
Pakiet mxStack zawiera implementacjê stosu, która zawiera typowe
metody takie jak pop() czy push(). Mechanizm zosta³ napisany tak by,
przy minimalnym zu¿yciu pamiêci, by³ bardzo wydajny.
%package -n python-mx-Queue
Summary: Queue implementation for Python
Summary(pl): Implementacja kolejki dla jêzyka Python
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-Queue
mxQueue is an extension package that provides a new object type called
having .push() and .pop() methods and focusses on obtaining maximum
speed at low memory costs.
-%description -l pl -n python-mx-Queue
+%description -n python-mx-Queue -l pl
Pakiet mxQueue zawiera implementacjê kolejki, która zawiera typowe
metody takie jak pop() czy push(). Mechanizm zosta³ napisany tak by,
przy minimalnym zu¿yciu pamiêci, by³ bardzo wydajny.
%package -n python-mx-Tools
Summary: Some handy functions and objects which provides new builtins for Python
Summary(pl): Kilka u¿ytecznych klas i funkcji w postaci wew. mechanizmów Pythona
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-Tools
mxTools is an extension package that includes a collection of handy
be available to all users at your site as if they were installed in
the Python interpreter itself.
-%description -l pl -n python-mx-Tools
+%description -n python-mx-Tools -l pl
Pakiet mxTools zawiera kilka u¿ytecznych klas i funkcji, które daj±
wiêcej mo¿liwo¶ci programi¶cie, w postaci wewnêtrznych mechanizmów
jêzyka Python.
%package -n python-mx-Proxy
Summary: Support for Bastion like implementations for Python
Summary(pl): Wsparcie dla implementacji typu Bastion dla jêzyka Python
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-Proxy
mxProxy is an extension package that provides a new type that is
references which help you work with circular references in a way that
doesn't cause memory leakage in a Python system.
-%description -l pl -n python-mx-Proxy
+%description -n python-mx-Proxy -l pl
Pakiet mxProxy dostarcza nowe klasy, które implementuj± funkcjonalno¶æ
typu Bastion bez potrzeby ograniczania ¶rodowiska, w którym jest
wykonywana aplikacja.
%package -n python-mx-BeeBase
Summary: High performance construction kit for disk based indexed databases (B+Tree)
Summary(pl): Wysokiej jako¶ci pakiet do tworzenia indeksowanych baz danych (B+Tree)
-Group: Development/Languages/Python
-Group(de): Entwicklung/Sprachen/Python
-Group(pl): Programowanie/Jêzyki/Python
-%requires_eq python
-Requires: python-%{module} = %{version}
+Group: Libraries/Python
+%pyrequires_eq python
+Requires: python-%{module} = %{version}-%{release}
%description -n python-mx-BeeBase
mxBeeBase is a high performance construction kit for disk based
optimized B+Tree implementation built on top of Thomas Niemann's
Cookbook B+Tree implementation.
-%description -l pl -n python-mx-BeeBase
+%description -n python-mx-BeeBase -l pl
mxBeeBase jest wysokiej jako¶ci pakietem do tworzenia indeksowanych
baz danych. Zawiera komponenty, które mo¿na razem ³±czyæ w celu
zbudowania w³asnej bazy. Obecny limit ilo¶ci danych wynosi 2GB (max.
Newmanna.
%prep
+#%%setup -q -n %{module}-%{version}.%{fn_sufix}
%setup -q -n %{module}-%{version}
%build
%install
rm -rf $RPM_BUILD_ROOT
-python setup.py install --root=$RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{py_incdir}/mx
+python setup.py install \
+ --root=$RPM_BUILD_ROOT \
+ --install-purelib=%{py_sitedir}
-gzip -9nf README mx/LICENSE mx/COPYRIGHT mx/Doc/*.txt
+find $RPM_BUILD_ROOT%{py_sitedir} -name \*.h \
+ -exec mv {} $RPM_BUILD_ROOT%{py_incdir}/mx \;
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc *.gz mx/*.gz mx/Doc/*.gz mx/Doc/mx{Extensions,License}.html
+%doc README mx/LICENSE mx/COPYRIGHT mx/Doc/mxLicense.html
%dir %{mxdir}
+%dir %{py_incdir}/mx
%{mxdir}/*.py[co]
%dir %{mxdir}/Misc
%{mxdir}/Misc/*.py[co]
+%files devel
+%defattr(644,root,root,755)
+%{py_incdir}/mx/mxh.h
+
%files -n python-mx-DateTime
%defattr(644,root,root,755)
%doc mx/DateTime/Doc/*.html
%{mxdir}/DateTime/mxDateTime/*.py[co]
%attr(755,root,root) %{mxdir}/DateTime/mxDateTime/*.so
+%files -n python-mx-DateTime-devel
+%defattr(644,root,root,755)
+%{py_incdir}/mx/mxDateTime.h
+
%files -n python-mx-TextTools
%defattr(644,root,root,755)
%doc mx/TextTools/Doc/*.html