Blob Blame History Raw
Summary:  A collection of Python software tools
Name: python-egenix-mx-base
Version: 3.2.4
Release: 2%{?dist}
URL: http://www.egenix.com/products/python/mxBase/
Source0: http://downloads.egenix.com/python/egenix-mx-base-%{version}.tar.gz
License: eGenix
Group: Development/Libraries
BuildRequires: Distutils
BuildRequires: python2-devel >= 2.7

# For name change from mx to python-mx
Provides: mx = %{version}-%{release}
Obsoletes: mx < %{version}-%{release}

# Install to platform lib directory
Patch1: mx-3.1.1-lib64.patch

# we don't want to provide private python extension libs
%{?filter_setup:
%filter_provides_in %{python_sitearch}/.*\.so$
%filter_setup
}

%description
The mx extensions for Python are a collection of Python software tools
which enhance Python's usability in many areas.

%package devel
Summary: Development files for %{name}
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: mx-devel = %{version}-%{release}
Obsoletes: mx-devel < 3.2.3-2

%description devel
Development files for %{name}

%package doc
Summary: Documentation for %{name}
Group: Documentation

%description doc
The mx extensions for Python are a collection of Python software tools
which enhance Python's usability in many areas. This package contains
the documentation.

%prep
%setup -q -n egenix-mx-base-%{version}
%patch1 -p1 -b .lib64

# alter /usr/local/bin/python
find mx/ -name "*.py" -exec sed -i -e 's:^#!.*python:#!%{_bindir}/python:' {} \;

# These just have test cases and aren't meant to be run
for file in mx/Log.py mx/BeeBase/FileLock.py mx/BeeBase/mxBeeBase/testernesto.py \
        mx/Misc/OrderedMapping.py mx/Misc/Daemon.py mx/Misc/FileLock.py; do
    sed -i -e '/^#!.*python/d' ${file}
done

%build
CFLAGS="%{optflags}" python setup.py build

%install
python setup.py install --skip-build --root=%{buildroot}

pushd %{buildroot}%{python_sitearch}
for I in `find . -name '*.h'`; do
    mkdir -p %{buildroot}%{_includedir}/`dirname $I`
    mv $I %{buildroot}%{_includedir}/`dirname $I`
done
popd

# Examples, tests, benchmarks
BASEDIR=%{buildroot}%{python_sitearch}
mkdir examples
mv ${BASEDIR}/mx/TextTools/mxTextTools/testkj.p* examples/
mv ${BASEDIR}/mx/Stack/stackbench.p* examples/
mv ${BASEDIR}/mx/Queue/queuebench.p* examples/
mv ${BASEDIR}/mx/DateTime/mxDateTime/test.p* examples/
# This is a utility.  If it's deemed useful to the general public it should
# be installed in %{_bindir} instead of examples
mv ${BASEDIR}/mx/BeeBase/showBeeDict.p* examples/

# These files are documentation, and are in a bad location
mkdir docs
mv -f ${BASEDIR}/mx/{LICENSE,COPYRIGHT} docs/
rm -rf ${BASEDIR}/mx/Doc
DESTDIR=`pwd`/docs
pushd ${BASEDIR}/mx
cp -pr --parents */Doc/* ${DESTDIR}/
cp -pr --parents */Examples/* ${DESTDIR}/
popd

# Cleanup
rm -rf ${BASEDIR}/mx/*/Doc/
rm -rf ${BASEDIR}/mx/*/Examples
rm -rf docs/*/Examples/*.pyc
rm -rf docs/*/Examples/*.pyo
rm -rf examples/*.pyc
rm -rf examples/*.pyo

# Fixup permissions
find %{buildroot}%{python_sitearch}/mx/ -name \*.so -exec chmod 755 {} \;

%files 
%doc COPYRIGHT LICENSE README
%{python_sitearch}/mx/
%{python_sitearch}/egenix_mx_base*.egg-info

%files devel
%{_includedir}/mx/

%files doc
%doc docs/*

%changelog
* Thu Jan 10 2013 Nils Philippsen <nils@redhat.com> 3.2.4-2
- ensure updated mx packages are obsoleted

* Fri Aug 03 2012 Brian C. Lane <bcl@redhat.com> 3.2.4-1
- Changed package name to python-egenix-mx-base (#726841)
- cleaned up spec file

* Fri Jul 29 2011 Brian C. Lane <bcl@redhat.com> - 3.2.0-2
- Changing package name to python-mx

* Fri Jul 29 2011 Brian C. Lane <bcl@redhat.com> - 3.2.0-1
- Upstream v3.2.0
- Removed long year patch, now in upstream
- Support for Python 2.3 dropped

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 3.1.1-6
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 3.1.1-3
- Rebuild for Python 2.6

* Mon Sep 15 2008 Toshio Kuratomi <toshio@fedoraproject.org> 3.1.1-2
- Restore debug package
- Clean up the python site-packages handling
- Clean up handling of documentation, examples, scripts

* Mon Sep 15 2008 Paul F. Johnson <paul@all-the-johnsons.co.uk> 3.1.1-1
- bump to newest release
- patch fixes
- spec file fixes
- branch new devel sub package
- fixes to permissions
- removed debug-package (empty)

* Thu Dec  7 2006 Jeremy Katz <katzj@redhat.com> - 2.0.6-3
- rebuild against python 2.5

* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 2.0.6-2.2.2
- rebuild

* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 2.0.6-2.2.1
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 2.0.6-2.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt

* Mon Mar 14 2005 Mihai Ibanescu <misa@redhat.com> 2.0.6-2
- Rebuilt

* Wed Feb 02 2005 Elliot Lee <sopwith@redhat.com> 2.0.6-1
- Rebuild with python 2.4

* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Sun Nov 23 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- update to 2.0.5
- recompile with python 2.3

* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt

* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt

* Wed Dec 11 2002 Tim Powers <timp@redhat.com> 2.0.3-7
- lib64'ize

* Tue Aug 06 2002 Elliot Lee <sopwith@redhat.com> 2.0.3-6
- Provide mx2 dep

* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Wed May 29 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.0.3-4
- Make it require python >= 2.2, < 2.3

* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Thu May 23 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.0.3-2
- Move to python 2.2

* Wed Mar 13 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.0.3-1
- 2.0.3

* Wed Feb 27 2002 Trond Eivind Glomsrød <teg@redhat.com> 2.0.2-5
- Rebuild (and no, it wasn't broken. It just used /usr/bin/python
  as the version to build for)

* Mon Jan 21 2002 Elliot Lee <sopwith@redhat.com> 2.0.2-4
- Remove pyver autodetection (it's broken!) and install header files

* Wed Jan 09 2002 Tim Powers <timp@redhat.com>
- automated rebuild

* Mon Oct  1 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.0.2-2
- detect python version when building
- 64bit fix mxDateTime

* Fri Sep 14 2001 Trond Eivind Glomsrød <teg@redhat.com> 2.0.2-1
- 2.0.2
- Build for Python 2.2

* Tue Jun 19 2001 Trond Eivind Glomsrød <teg@redhat.com>
- Initial build. Needed for python DB API