rpms/pypar/devel pypar.spec,1.3,1.4

Jussi Lehtola jussilehtola at fedoraproject.org
Tue Dec 22 11:22:19 UTC 2009


Author: jussilehtola

Update of /cvs/pkgs/rpms/pypar/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18211

Modified Files:
	pypar.spec 
Log Message:
Update to 2.1.4_94, apply MPI guidelines, fix FTBFS.


Index: pypar.spec
===================================================================
RCS file: /cvs/pkgs/rpms/pypar/devel/pypar.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- pypar.spec	26 Jul 2009 19:56:03 -0000	1.3
+++ pypar.spec	22 Dec 2009 11:22:18 -0000	1.4
@@ -1,8 +1,8 @@
 %{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
 
 Name:		pypar
-Version:	2.1.0_66
-Release:	5%{?dist}
+Version:	2.1.4_94
+Release:	1%{?dist}
 Summary:	Parallel programming with Python
 Group:		Development/Libraries
 License:	GPLv2+
@@ -12,102 +12,164 @@ BuildRoot:	%{_tmppath}/%{name}-%{version
 
 BuildRequires:	numpy
 BuildRequires:	python-setuptools-devel
+
+%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
+Requires:	openmpi
+
+%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.
 
-Requires:	numpy
+This package contains pypar compiled against Open MPI.
 
-# Check for mpi-selector or environment-modules
-%global selector 0
-%global modules 0
-
-%if 0%{?fedora} > 9
-%global modules 1
-%endif
-
-%if 0%{?rhel} == 4
-%global selector 1
-%endif
-
-%if 0%{?rhel} == 5
-%global selector 1
-%endif
-
-%if %modules == 1
-BuildRequires:  environment-modules
-%endif
-
-%if %selector == 1
-BuildRequires:  mpi-selector
-%endif
+%package mpich2
+Summary:        Parallel programming with Python, MPICH2 version
+Group:          Development/Libraries
+Requires:	%{name}-common = %{version}-%{release}
+Provides:	pypar-runtime = %{version}-%{release}
+BuildRequires:	mpich2-devel
+Requires:       numpy
+Requires:	mpich2
 
-%description
+%description mpich2
 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 MPICH2.
+
+
 %prep
-%setup -q -n %{name}_%{version}
+# 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 mpich2; do 
+ cp -r pypar_%{version} $mpi
+done 
+
+# Clean out unneeded dir
+rm -rf pypar_%{version}
+
 
 %build
-# Load MPI enviroment
-%if %modules == 1
-. /etc/profile.d/modules.sh
-%if 0%{?fedora} < 12
-module load %{_libdir}/openmpi/*/openmpi.module
-%else
-module load openmpi-%{_arch}
-%endif
-export CFLAGS="$CFLAGS %{optflags}"
-%endif
-
-%if %selector == 1
-mpi-selector --set `mpi-selector --list | grep openmpi`
-source /etc/profile.d/mpi-selector.sh
-%endif
+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}
 
-cd source 
+# Build MPICH2 version
+%{_mpich2_load}
+cd mpich2/source
 CFLAGS="%{optflags}" python -c 'import setuptools; execfile("setup.py")' build
+cd -
+%{_mpich2_unload}
 
 
 %install
 rm -rf %{buildroot}
-cd source
+
+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}
+
+%{_mpich2_load}
+cd mpich2/source
 python -c 'import setuptools; execfile("setup.py")' install -O1 --skip-build --root %{buildroot}
-cd ..
+mkdir -p %{buildroot}%{python_sitearch}/mpich2
+mv %{buildroot}%{python_sitearch}/pypar/ %{buildroot}%{python_sitearch}/Pypar*.egg-info %{buildroot}%{python_sitearch}/mpich2
+cd -
+%{_mpich2_unload}
+
 
 %clean
 rm -rf %{buildroot}
 
-%files
+%files common
+%defattr(-,root,root,-)
+%doc openmpi/documentation/* openmpi/LICENSE openmpi/demos/
+
+%files openmpi
 %defattr(-,root,root,-)
-%doc documentation/* LICENSE demos/
-%{python_sitearch}/pypar/
-%{python_sitearch}/Pypar*.egg-info
+%{python_sitearch}/openmpi/pypar/
+%{python_sitearch}/openmpi/Pypar*.egg-info
+
+%files mpich2
+%defattr(-,root,root,-)
+%{python_sitearch}/mpich2/pypar/
+%{python_sitearch}/mpich2/Pypar*.egg-info
 
 %changelog
+* Tue Dec 22 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.4_94-1
+- Update to 2.1.4_94, fixing MPICH2 build issue.
+
+* Mon Dec 21 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.3_91-1
+- Implement MPI guidelines, adding MPICH2 package.
+- Update to 2.1.3_91.
+
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.1.0_66-5
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
-* Thu Jul 23 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_66-4
+* Thu Jul 23 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_66-4
 - Openmpi seems to have been fixed, fix build in rawhide.
 
-* Thu Jun 04 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_66-3
+* Thu Jun 04 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_66-3
 - Fix build in rawhide.
 
-* Fri May 15 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_66-2
+* Fri May 15 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_66-2
 - Merge examples into main package and %doc.
 - Spec file cleanups.
 
-* Mon Mar 02 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_66-1
+* Mon Mar 02 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_66-1
 - Update to 2.1.0_66.
 - Branch examples into subpackage.
 
-* Sun Feb 29 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_64-1
+* Sun Feb 29 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_64-1
 - Update to 2.1.0_64.
 
-* Sat Feb 28 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_63-1
+* Sat Feb 28 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_63-1
 - Update to 2.1.0_63 that should fix rpmlint errors.
 
-* Thu Feb 26 2009 Jussi Lehtola <jussi.lehtola at iki.fi> - 2.1.0_53-1
+* Thu Feb 26 2009 Jussi Lehtola <jussilehtola at fedoraproject.org> - 2.1.0_53-1
 - First release.




More information about the fedora-extras-commits mailing list