%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: pypar Version: 2.1.5_108 Release: 12%{?dist} Summary: Parallel programming with Python Group: Development/Libraries License: GPLv2+ URL: http://code.google.com/p/pypar/ Source0: http://pypar.googlecode.com/files/pypar-%{version}.tgz # Get rid of OpenMPI specific stuff Patch0: pypar-mpich.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: numpy BuildRequires: python-devel BuildRequires: python-setuptools %description Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using message passing. Pypar provides bindings to a subset of the message passing interface standard MPI. %package common Summary: Common files for pypar packages Group: Documentation BuildArch: noarch %description common This package contains common files shared by all MPI flavors of pypar: the license, the documentation and the examples. %package openmpi Summary: Parallel programming with Python, Open MPI version Group: Development/Libraries Obsoletes: %{name} < %{version}-%{release} Requires: %{name}-common = %{version}-%{release} Provides: pypar-runtime = %{version}-%{release} BuildRequires: openmpi-devel Requires: numpy %description openmpi Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using message passing. Pypar provides bindings to a subset of the message passing interface standard MPI. This package contains pypar compiled against Open MPI. %package mpich Summary: Parallel programming with Python, MPICH2 version Group: Development/Libraries Requires: %{name}-common = %{version}-%{release} Provides: pypar-runtime = %{version}-%{release} BuildRequires: mpich-devel Requires: numpy Provides: %{name}-mpich2 = %{version}-%{release} Obsoletes: %{name}-mpich2 < 2.1.5_108-2 %description mpich Pypar is an efficient but easy-to-use module that allows programs written in Python to run in parallel on multiple processors and communicate using message passing. Pypar provides bindings to a subset of the message passing interface standard MPI. This package contains pypar compiled against MPICH. %prep # Setup buildroot but don't extract anything yet %setup -q -c -T # Decompress tarball tar zxf %{SOURCE0} # Make separate dirs for all MPI variants for mpi in openmpi mpich; do cp -r pypar_%{version} $mpi done # Clean out unneeded dir rm -rf pypar_%{version} # Prepare mpich source cd mpich %patch0 -p1 cd .. # Prepare OpenMPI source libmpiso=$(ls -1 %{_libdir}/openmpi/lib/libmpi.so.? | tail -n 1) if [ -n "$libmpiso" -a -f "$libmpiso" ] ; then sed -i "s|libmpi.so.0|$(basename $libmpiso)|g" openmpi/source/pypar.py else exit 1 fi %build export CC=mpicc export CXX=mpicxx # Build Open MPI version %{_openmpi_load} cd openmpi/source CFLAGS="%{optflags}" python -c 'import setuptools; execfile("setup.py")' build cd - %{_openmpi_unload} # Build MPICH2 version %{_mpich_load} cd mpich/source CFLAGS="%{optflags}" python -c 'import setuptools; execfile("setup.py")' build cd - %{_mpich_unload} %install rm -rf %{buildroot} export CC=mpicc export CXX=mpicxx export LD=mpicc %{_openmpi_load} cd openmpi/source python -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot} mkdir -p %{buildroot}%{python_sitearch}/openmpi mv %{buildroot}%{python_sitearch}/pypar/ %{buildroot}%{python_sitearch}/Pypar*.egg-info %{buildroot}%{python_sitearch}/openmpi cd - %{_openmpi_unload} %{_mpich_load} cd mpich/source python -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot} mkdir -p %{buildroot}%{python_sitearch}/mpich mv %{buildroot}%{python_sitearch}/pypar/ %{buildroot}%{python_sitearch}/Pypar*.egg-info %{buildroot}%{python_sitearch}/mpich cd - %{_mpich_unload} %clean rm -rf %{buildroot} %files common %defattr(-,root,root,-) %doc openmpi/documentation/* openmpi/LICENSE openmpi/demos/ %files openmpi %defattr(-,root,root,-) %{python_sitearch}/openmpi/pypar/ %{python_sitearch}/openmpi/Pypar*.egg-info %files mpich %defattr(-,root,root,-) %{python_sitearch}/mpich/pypar/ %{python_sitearch}/mpich/Pypar*.egg-info %changelog * Tue Sep 15 2015 Orion Poplawski - 2.1.5_108-12 - Rebuild for openmpi 1.10.0 * Mon Aug 17 2015 Zbigniew Jędrzejewski-Szmek - 2.1.5_108-11 - Rebuild for rpm-mpi-hooks-3-1 * Sat Aug 15 2015 Zbigniew Jędrzejewski-Szmek - 2.1.5_108-10 - Rebuild for MPI provides * Sun Jul 26 2015 Sandro Mani - 2.1.5_108-9 - Rebuild for RPM MPI Requires Provides Change * Thu Jun 18 2015 Fedora Release Engineering - 2.1.5_108-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sun May 3 2015 Zbigniew Jędrzejewski-Szmek - 2.1.5_108-7 - Rebuild for changed mpich * Sun Aug 17 2014 Fedora Release Engineering - 2.1.5_108-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 2.1.5_108-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sat Feb 22 2014 Deji Akingunola - 2.1.5_108-4 - Rebuild for mpich-3.1 * Sun Aug 04 2013 Fedora Release Engineering - 2.1.5_108-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Sat Jul 20 2013 Deji Akingunola - 2.1.5_108-2 - Rename mpich2 sub-packages to mpich and rebuild for mpich-3.0 * Sat Feb 02 2013 Susi Lehtola - 2.1.5_108-1 - Update to 2.1.5_108. * Fri Nov 02 2012 Jussi Lehtola - 2.1.4_94-7.1 - Bump due to MPICH2 update. * Sat Jul 21 2012 Fedora Release Engineering - 2.1.4_94-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sat Jan 14 2012 Fedora Release Engineering - 2.1.4_94-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Nov 17 2011 Jussi Lehtola - 2.1.4_94-5 - Drop OpenMPI specific workaround in pypar.py from MPICH2 version. - Patch in correct version of OpenMPI in pypar.py (BZ #754262). * Wed Mar 30 2011 Deji Akingunola - 2.1.4_94-4 - Rebuild for mpich2 soname bump * Tue Feb 08 2011 Fedora Release Engineering - 2.1.4_94-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Wed Jul 21 2010 David Malcolm - 2.1.4_94-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Tue Dec 22 2009 Jussi Lehtola - 2.1.4_94-1 - Update to 2.1.4_94, fixing MPICH2 build issue. * Mon Dec 21 2009 Jussi Lehtola - 2.1.3_91-1 - Implement MPI guidelines, adding MPICH2 package. - Update to 2.1.3_91. * Sun Jul 26 2009 Fedora Release Engineering - 2.1.0_66-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Jul 23 2009 Jussi Lehtola - 2.1.0_66-4 - Openmpi seems to have been fixed, fix build in rawhide. * Thu Jun 04 2009 Jussi Lehtola - 2.1.0_66-3 - Fix build in rawhide. * Fri May 15 2009 Jussi Lehtola - 2.1.0_66-2 - Merge examples into main package and %doc. - Spec file cleanups. * Mon Mar 02 2009 Jussi Lehtola - 2.1.0_66-1 - Update to 2.1.0_66. - Branch examples into subpackage. * Sun Mar 01 2009 Jussi Lehtola - 2.1.0_64-1 - Update to 2.1.0_64. * Sat Feb 28 2009 Jussi Lehtola - 2.1.0_63-1 - Update to 2.1.0_63 that should fix rpmlint errors. * Thu Feb 26 2009 Jussi Lehtola - 2.1.0_53-1 - First release.