File python-egenix-mx-base.spec of Package python-egenix-mx-base

#
# spec file for package python-egenix-mx-base (Version 3.1.2)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild


Name:           python-egenix-mx-base
BuildRequires:  python-devel
Summary:        MX Extensions for Python (base)
Version:        3.1.2
Release:        1
Source0:        egenix-mx-base-%{version}.tar.bz2
Patch0:         egenix-mx-base-3.1.2-install_data.patch
License:        Python Copyright, Other License(s), see package
Group:          Development/Libraries/Python
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
%if 0%{?suse_version} >= 1030
BuildRequires:  fdupes
%endif
Url:            http://www.egenix.com/files/python/eGenix-mx-Extensions.html
%{py_requires}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}

%description
A collection of Python software tools which enhance Python's usability
in areas such as fast text processing and date and time processing.
mxDateTime is required by the PostgreSQL Python interface (pygresql).



Authors:
--------
    Marc-André Lemburg

%package devel
License:        Python Copyright, Other License(s), see package
Summary:        Development files for %name
Group:          Development/Libraries/Python
Requires:       %name = %version

%description devel
A collection of Python software tools which enhance Python's usability
in areas such as fast text processing and date and time processing.
mxDateTime is required by the PostgreSQL Python interface (pygresql)



Authors:
--------
    Marc-André Lemburg

%package doc
License:        Python Copyright, Other License(s), see package
Summary:        Documents files for %name
Group:          Development/Libraries/Python
Requires:       %name = %version

%description doc
A collection of Python software tools which enhance Python's usability
in areas such as fast text processing and date and time processing.
mxDateTime is required by the PostgreSQL Python interface (pygresql)



Authors:
--------
    Marc-André Lemburg

%prep
%setup -q -n "egenix-mx-base-%{version}"
%patch0

%build
CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" %__python setup.py build

%install
%__python setup.py install --prefix="%{_prefix}" --root="$RPM_BUILD_ROOT"
# docs:
%__install -d -m755 $RPM_BUILD_ROOT/%{_docdir}/%{name}
%__install -m644 LICENSE COPYRIGHT $RPM_BUILD_ROOT/%{_docdir}/%{name}
pushd "$RPM_BUILD_ROOT/%{_docdir}/%{name}"
find "%{buildroot}%{python_sitearch}/mx/" -type d -name Doc -print | \
    (
        while read DIR ; do
            NAME=`echo "$DIR" | %__sed 's@.*mx/@@;s@/Doc@@'`
            REL=$(%__perl -e 'use File::Spec; print File::Spec->abs2rel("'"$DIR"'"),"\n";')
            if [ "$NAME" = "Doc" ] ; then
                %__ln_s "$REL"/* .
            else
                %__ln_s "$REL" "$NAME"
            fi
        done
    )
find "%{buildroot}%{python_sitearch}/mx/" -type f -name '*.py' \
| while read f; do
    %__sed -i '/^#!/d' "$f"
done
%if 0%{?suse_version} >= 1030
%fdupes -s "%{buildroot}/"
%endif

%clean
%__rm -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%dir %{python_sitearch}/mx
%dir %{python_sitearch}/mx/BeeBase
%dir %{python_sitearch}/mx/BeeBase/mxBeeBase
%dir %{python_sitearch}/mx/DateTime
%dir %{python_sitearch}/mx/DateTime/mxDateTime
%dir %{python_sitearch}/mx/Misc
%dir %{python_sitearch}/mx/Proxy
%dir %{python_sitearch}/mx/Proxy/mxProxy
%dir %{python_sitearch}/mx/Queue
%dir %{python_sitearch}/mx/Queue/mxQueue
%dir %{python_sitearch}/mx/Stack
%dir %{python_sitearch}/mx/Stack/mxStack
%dir %{python_sitearch}/mx/TextTools
%dir %{python_sitearch}/mx/TextTools/Constants
%dir %{python_sitearch}/mx/TextTools/mxTextTools
%dir %{python_sitearch}/mx/Tools
%dir %{python_sitearch}/mx/Tools/mxTools
%dir %{python_sitearch}/mx/UID
%dir %{python_sitearch}/mx/UID/mxUID
%dir %{python_sitearch}/mx/URL
%dir %{python_sitearch}/mx/URL/mxURL
%{python_sitearch}/mx/*/*/*.py
%{python_sitearch}/mx/*/*/*.pyc
%{python_sitearch}/mx/*/*/*.pyo
%{python_sitearch}/mx/*/*.py
%{python_sitearch}/mx/*/*.pyc
%{python_sitearch}/mx/*/*.pyo
%{python_sitearch}/mx/*.py
%{python_sitearch}/mx/*.pyc
%{python_sitearch}/mx/*.pyo
%{python_sitearch}/mx/*/*/*.so
%{python_sitearch}/egenix_mx_base-%{version}-py%{py_ver}.egg-info
%exclude %{python_sitearch}/mx/COPYRIGHT
%exclude %{python_sitearch}/mx/LICENSE
%exclude %{python_sitearch}/mx/*/COPYRIGHT
%exclude %{python_sitearch}/mx/*/LICENSE
%exclude %{python_sitearch}/mx/*/README
%exclude %{python_sitearch}/mx/Doc
%exclude %{python_sitearch}/mx/*/Doc
%exclude %{python_sitearch}/mx/*/Examples

%files devel
%defattr(-,root,root)
%{python_sitearch}/mx/*/*/*.h

%files doc
%defattr(-,root,root)
%doc /%{_docdir}/%{name}
%doc %{python_sitearch}/mx/COPYRIGHT
%doc %{python_sitearch}/mx/LICENSE
%doc %{python_sitearch}/mx/*/COPYRIGHT
%doc %{python_sitearch}/mx/*/LICENSE
%doc %{python_sitearch}/mx/*/README
%doc %{python_sitearch}/mx/Doc
%doc %{python_sitearch}/mx/*/Doc
%doc %{python_sitearch}/mx/*/Examples

%changelog
openSUSE Build Service is sponsored by