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

#
# spec file for package python-egenix-mx-base
#
# Copyright (c) 2015 SUSE LINUX 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/
#


Name:           python-egenix-mx-base
Version:        3.2.8
Release:        0
Url:            http://www.egenix.com/products/python/mxBase/
Summary:        MX Extensions for Python (base)
License:        SUSE-Egenix-1.1.0
Group:          Development/Libraries/Python
Source0:        egenix-mx-base-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  fdupes
BuildRequires:  python-devel
BuildRequires:  python-setuptools
Provides:       python-egenix-mx-base-doc = %{version}
Obsoletes:      python-egenix-mx-base-doc < %{version}
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%endif

%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).

%package devel
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)

%prep
%setup -q -n "egenix-mx-base-%{version}"
# remove unwanted shebang
find mx -name "*.py" | xargs sed -i '1 { /^#!/ d }'

%build
CFLAGS="%{optflags} -fno-strict-aliasing" python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-data=%{python_sitearch}/mx
%fdupes %{buildroot}%{_prefix}

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

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

%changelog
openSUSE Build Service is sponsored by