Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 25dc0884f7682da33a9540db68d1169f > files > 5

ScientificPython-2.8-10.fc13.src.rpm

%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%define pyver %(python -c 'import sys ; print sys.version[:3]')

Name:           ScientificPython
Version:        2.8
Release:        10%{?dist}
Summary:        A collection of Python modules that are useful for scientific computing

Group:          Development/Languages
License:        CeCILL
URL:            http://dirac.cnrs-orleans.fr/ScientificPython/
Source0:        http://sourcesup.cru.fr/frs/download.php/1034/ScientificPython-%{version}.tar.gz
Patch0:         ScientificPython-arch-lib.patch
Patch1:         ScientificPython-mpi-compile.patch
Patch2:         ScientificPython-netcdf-better-location.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  python-devel
BuildRequires:  netcdf-devel 
BuildRequires:  openmpi-devel 
BuildRequires: numpy,numpy-f2py
Requires: numpy

%package devel
Summary:        The development files for ScientificPython
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%package tk
Summary:        The tk widgets from ScientificPython
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}
Requires:       tkinter

%package qt
Summary:        The Qt widgets from ScientificPython
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}
Requires:       PyQt

%package doc
Summary:        Documentation and examples for ScientificPython
Group:          Documentation
Requires:       %{name} = %{version}-%{release}

%description
ScientificPython is a collection of Python modules that are useful for
scientific computing.  In this collection you will find modules that cover
basic geometry (vectors, tensors, transformations, vector and tensor
fields), quaternions, automatic derivatives, (linear) interpolation,
polynomials, elementary statistics, nonlinear least-squares fits, unit
calculations, Fortran-compatible text formatting, 3D visualization via
VRML, and two Tk widgets for simple line plots and 3D wireframe models.
There are also interfaces to the netCDF library (portable structured
binary files), to MPI (Message Passing Interface, message-based parallel
programming), and to BSPlib (Bulk Synchronous Parallel programming)

%description devel
This package contains the ScientificPython header files

%description tk
This package contains the ScientificPython Tkwidgets

%description qt
This package contains the ScientificPython Qtwidgets

%description doc
Install this package if you want the developers' documentation and examples
that tell you how to program with ScientificPython.

%prep
%setup -q
%patch1 -p 1
%patch2 -p 0

%build
#export PATH=/usr/lib/openmpi/bin:$PATH
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
export PATH=%{_libdir}/openmpi/bin:$PATH
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
export PYTHONPATH="$PYTHONPATH:$RPM_BUILD_ROOT/%{python_sitearch}/"
#export PYINCLUDE="$RPM_BUILD_ROOT/%{_includedir}/python%{pyver}/"
#export NUMPYINCLUDE="$RPM_BUILD_ROOT/%{python_sitearch}//numpy/core/include/"
#cp -R %{_includedir}/python%{pyver}/* $PYINCLUDE
cd Src/MPI/
#cat compile.py|sed -e 's/-I/-I$PYINCLUDE -I$NUMPYINCLUDE -I/' > compile-new.py
%{__python} compile.py
mv mpipython $RPM_BUILD_ROOT/%{_bindir}/

cat <<EOF > impipython.sh
#!/bin/bash
# This is a reference script provided to show you an example of how to 
# call the interactive parallel computing python console using mpirun.
#
# Here "-np X" refers to the number of processors to use for this 
# parallel process. To use this script you should copy this file to a 
# location of youyr choosing, edit the -np argument as needed for your 
# mpi system configuration and make this file executable.
#
# This file is a filepath corrected version of the impipython reference file
# provided in the upstream source distribution so it will work as written on 
# Fedora Linux. For more information, please refer to the README.MPI
# files that comes with the ScientificPython package  and to the available 
# documentation for the mpirun executable. 

mpirun -np 2 `python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)+'/Scientific/BSP/console.py'"` $*
EOF

cat impipython.sh

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc LICENSE README Doc/CHANGELOG README.MPI README.BSP Src/MPI/impipython.sh 
%dir %{python_sitearch}/Scientific/
%{python_sitearch}/Scientific/*.py*
%{python_sitearch}/Scientific/Functions
%{python_sitearch}/Scientific/Geometry
%{python_sitearch}/Scientific/IO
%{python_sitearch}/Scientific/linux2
%{python_sitearch}/Scientific/Physics
%{python_sitearch}/Scientific/Signals
%{python_sitearch}/Scientific/Statistics
%{python_sitearch}/Scientific/Threading
#%{python_sitearch}/Scientific/use_numeric
%{python_sitearch}/Scientific/Visualization
%{python_sitearch}/Scientific/MPI
%{python_sitearch}/Scientific/BSP
%{python_sitearch}/Scientific/Clustering
%{python_sitearch}/Scientific/DistributedComputing
%{python_sitearch}/*.egg-info
%{_bindir}/bsp_virtual
%{_bindir}/mpipython
%{_bindir}/task_manager

%files devel
%defattr(-,root,root,-)
%dir %{_includedir}/python%{pyver}/Scientific
%{_includedir}/python%{pyver}/Scientific/*.h


%files tk
%defattr(-,root,root,-)
%{python_sitearch}/Scientific/TkWidgets

%files qt
%defattr(-,root,root,-)
%{python_sitearch}/Scientific/QtWidgets

%files doc
%defattr(-,root,root,-)
%doc Doc/Reference Examples Doc/BSP_Tutorial.pdf

%changelog
* Wed Jun 9 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-10
- Rebuild using numpy-f2py as a buildrequires fixes bug 602191

* Thu Apr 1 2010 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-9
- Rebuild for numpy 1.4.0

* Wed Nov 25 2009 Orion Poplawski <orion cora.nwra.com> - 2.8-8
- Rebuild for netcdf 4.1.0

* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.8-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Jul 15 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-6
- Even better patch!

* Wed Jul 15 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-5
- Fix netcdf location patch with better long term fix provided 
  by user in bug 511313

* Sun Mar 1 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-4
- Fix MPI compile script 

* Sun Mar 1 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-3
- Fixed lib64 build issue

* Sun Mar 1 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-2
- Fixed BuildRequires to reference numpy instead of numeric

* Sun Mar 1 2009 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.8-1
- Latest upstream release

* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.6.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec  8 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.6.1-5
- Fix netcdf in lib64

* Mon Dec  8 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 2.6.1-4
- Remove obsolete patch

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

* Tue Sep  2 2008 Michael Schwendt <mschwendt@fedoraproject.org> - 2.6.1-2
- Include /usr/include/python%%{pyver}/Scientific directory

* Tue Jul 1 2008 Jef Spaleta <jspaleta AT fedoraproject DOT org> - 2.6.1-1
- Latest Stable release

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.6-12
- Autorebuild for GCC 4.3

* Fri Jan 04 2008 Jef Spaleta <jspaleta@gmail.com> 2.6-11
- egg-info fix

* Tue Aug 21 2007 Jef Spaleta <jspaleta@gmail.com> 2.6-10
- Bump for rebuild

* Thu Jul 19 2007 Jesse Keating <jkeating@redhat.com> 2.6-9
- Rebuild for new openmpi

* Sun May 27 2007 Jef Spaleta <jspaleta@gmail.com> 2.6-8
- rebuild to use netcdf shared libraries

* Mon Feb 12 2007 Jef Spaleta <jspaleta@gmail.com> 2.6-7
- Correct for multilib conflict in impipython.sh

* Sat Dec 30 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-6
- Correct for netcdf location patch to work with /usr/lib/lib64

* Thu Dec 28 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-5
- remove mpi and bsp subpackages. On more thought, 
-   it makes more sense to have the parallel computing items
-   in the main package.
- Added inline impipython.sh reference script
-   Replaces upstreams impipython reference file
-   This will have the correct path statements generated at
-   package buildtime. Still included as a doc item

* Wed Dec 27 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-4
- move impipython to docs section of mpi subpackage 
-   this is a script which must be editted by hand per system.
- Added Doc/BSP_Tutorial.pdf to docs subpackage
- Fixed description text line wrapping.

* Mon Dec 25 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-3
- Add tk and qt subpackages
- Add bsp and mpi subpackages
- Requires clean-ups for all subpackages
- Patch to correctly locate netcdf.a and netcdf.h

* Mon Dec 25 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-2
- Add docs subpackage

* Sun Dec 24 2006 Jef Spaleta <jspaleta@gmail.com> 2.6-1
- Initial ScientificPython Package