Package petsc4py-real: Specfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 | %define mpiimpl openmpi %define mpidir %_libdir/%mpiimpl #set_gcc_version 4.5 %def_enable docs %define scalar_type real %if "%scalar_type" == "real" %define alttype complex %else %define alttype real %endif %define oname petsc4py %define ldir %_libdir/petsc-%scalar_type Name: %oname-%scalar_type Version: 3.3.1 %define exampledir %_docdir/%oname-%version/examples Release: alt1.hg20130420 Summary: PETSc for Python (%scalar_type scalars) License: Public Group: Sciences/Mathematics Url: http://code.google.com/p/petsc4py Packager: Eugeny A. Rostovtsev (REAL) <real at altlinux.org> # hg clone https://petsc4py.googlecode.com/hg/ petsc4py Source: %oname-%version.tar.gz Requires: python-module-%name = %version-%release BuildPreReq: python-devel python-module-Pyro4 chrpath rpm-macros-make BuildPreReq: %mpiimpl-devel libpetsc-%scalar_type-devel libnumpy-devel BuildPreReq: libmpe2-devel libhdf5-mpi-devel libtriangle-devel libX11-devel BuildPreReq: liby12m-devel libsundials-devel libsz2-devel zlib-devel BuildPreReq: libexpat-devel libtetgen-devel python-module-mpi4py BuildPreReq: python-module-sphinx-devel python-module-Pygments BuildPreReq: texlive-latex-base /usr/bin/ssh BuildPreReq: python-module-Cython gcc-c++ gcc-fortran libgomp-devel %if "%scalar_type" == "complex" BuildPreReq: libfftw3-mpi-devel %endif BuildPreReq: libamesos10 libepetraext10 libifpack10 libtrilinos10 BuildPreReq: libgaleri10 BuildPreReq: libamesos10-devel libepetraext10-devel libifpack10-devel %description Python bindings for PETSc (%scalar_type scalars). %package -n python-module-%name Summary: Python module with bindings for PETSc (%scalar_type scalars) Group: Development/Python %add_python_lib_path %ldir/python %setup_python_module %oname Provides: python%_python_version(%oname) = %version-%release %py_provides %oname Requires: %name = %version-%release %description -n python-module-%name Python module with bindings for PETSc (%scalar_type scalars) Note: for work with this module You need run: source %_bindir/%name.sh %package -n %oname-examples Summary: Examples for Python bindings for PETSc Group: Development/Documentation BuildArch: noarch Provides: %name-examples = %version-%release Conflicts: %name-examples < %version-%release Obsoletes: %name-examples < %version-%release %description -n %oname-examples Examples for Python bindings for PETSc. %if_enabled docs %package -n python-module-%name-pickles Summary: Pickles for Python bindings for PETSc Group: Development/Documentation Provides: %name-examples = %version-%release Conflicts: %name-examples < %version-%release Obsoletes: %name-examples < %version-%release %description -n python-module-%name-pickles Pickles for Python bindings for PETSc. %package -n %oname-doc Summary: Documentation for Python bindings for PETSc Group: Development/Documentation BuildArch: noarch Provides: %name-doc = %version-%release Conflicts: %name-doc < %version-%release Obsoletes: %name-doc < %version-%release %description -n %oname-doc Documentation for Python bindings for PETSc. %endif %prep %setup sed -i 's|@PYVER@|%_python_version|g' docs/source/Makefile rm -f src/petsc4py.PETSc.c #rm -f src/*.c %install mpi-selector --set %mpiimpl source %_bindir/petsc-%scalar_type.sh export OMPI_LDFLAGS="-Wl,--as-needed,-rpath,%mpidir/lib -L%mpidir/lib" #sed -i 's|@MPIDIR@|%mpidir|g' conf/core/confutils.py #sed -i 's|@MPIIMPL@|%mpiimpl|g' conf/core/confutils.py #sed -i "s|@PETSCDIR@|$PETSC_DIR|g" conf/core/confutils.py #sed -i "s|@MPILIBS@||g" conf/core/confcore.py %add_optflags %optflags_shared -fno-strict-aliasing #python_build %make_ext config #make_ext cython python ./conf/cythonize.py for i in SNESPythonGetContext PCPythonGetContext \ PetscPythonRegisterAll MatPythonGetContext \ KSPPythonGetContext TSPythonGetContext do sed -i \ "s|\(PetscErrorCode $i\)|extern \"C\" \1|" \ src/libpetsc4py/libpetsc4py.c done sed -i \ "s|\(int import_libpetsc4py\)|extern \"C\" \1|" \ src/libpetsc4py/libpetsc4py.c %make_build_ext %if_enabled docs ln -s build/html/objects.inv docs/source/ %make -C docs/source html %endif %python_install install -d %buildroot%ldir/python mv %buildroot%python_sitelibdir/* \ %buildroot%ldir/python/ sed -i 's|^\(PETSC_ARCH\).*|\1 =|' \ %buildroot%ldir/python/%oname/lib/petsc.cfg %if_enabled docs install -d %buildroot%_docdir/%oname-%version cp -fR docs/source/_build/html \ %buildroot%_docdir/%oname-%version/ install -d %buildroot%python_sitelibdir/%name cp -fR docs/source/_build/pickle \ %buildroot%python_sitelibdir/%name/ %endif install -d %buildroot%exampledir sed -i 's|@EXAMPLES@|%exampledir|g' demo/kspsolve/test_mat_*.py cp -fR demo/* %buildroot%exampledir/ # example modules export PYTHONPATH=$PYTHONPATH:%buildroot%ldir/python pushd demo/bratu2d %make_build_ext bratu2df90 install -m644 *.so %buildroot%ldir/python popd pushd demo/poisson3d #f2py -m del2lib -c del2lib.f90 %make_build_ext del2lib.so poisson3d install -m644 *.so %buildroot%ldir/python install -d %buildroot%ldir/bin install -m755 poisson3d %buildroot%ldir/bin popd for i in %buildroot%ldir/bin/poisson3d \ %buildroot%ldir/python/%oname/lib/PETSc.so do chrpath -r %mpidir/lib:%ldir/lib $i done %files %doc HISTORY.txt LICENSE.txt README.txt %ldir/bin/* %files -n python-module-%name %dir %ldir/python %ldir/python/* %if "%scalar_type" == "real" %if_enabled docs %files -n %oname-doc %doc %dir %_docdir/%oname-%version %doc %_docdir/%oname-%version/* %exclude %_docdir/%oname-%version/examples %endif %files -n %oname-examples %doc %dir %_docdir/%oname-%version %doc %_docdir/%oname-%version/examples %endif %if_enabled docs %files -n python-module-%name-pickles %dir %python_sitelibdir/%name %python_sitelibdir/%name/pickle %endif %changelog * Mon Apr 22 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3.1-alt1.hg20130420 - Version 3.3.1 * Thu Jan 31 2013 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3-alt1.hg20121217 - New snapshot * Mon Aug 13 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 3.3-alt1.hg20120726 - Version 3.3 * Fri Jul 06 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2-alt2.hg20120531 - Changed native directory: %%_libexecdir/%name -> %%_libdir/%name * Sat Jun 02 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2-alt1.hg20120531 - New snapshot * Mon Apr 16 2012 Vitaly Kuznetsov <vitty@altlinux.ru> 1.2-alt1.hg20120223.1 - Rebuild to remove redundant libpython2.7 dependency * Fri Feb 24 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2-alt1.hg20120223 - New snapshot * Sun Dec 04 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.2-alt1.hg20111109 - Version 1.2 * Mon Nov 28 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1.2-alt2.hg20110505 - Rebuilt with docs (except pdf) * Sat Oct 22 2011 Vitaly Kuznetsov <vitty@altlinux.ru> 1.1.2-alt1.hg20110505.1 - Rebuild with Python-2.7 * Wed May 11 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1.2-alt1.hg20110505 - New snapshot * Tue Apr 05 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1.2-alt1.hg20101112.2 - Rebuilt with python-module-sphinx-devel * Mon Mar 07 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1.2-alt1.hg20101112.1 - Rebuilt for debuginfo * Thu Nov 18 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1.2-alt1.hg20101112 - Version 1.1.2 * Tue Oct 26 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.hg20100803.2 - Rebuilt for soname set-versions * Fri Oct 15 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.hg20100803.1 - Avoid --no-as-needed * Thu Aug 05 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.hg20100803 - New snapshot * Mon Jul 19 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.hg20100712.1 - Rebuilt with PETSc 3.1 * Tue Jul 13 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.1-alt1.hg20100712 - Version 1.1 * Wed Jul 07 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt1.hg20100225.2 - Rebuilt with reformed ParMetis * Fri Jun 18 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt1.hg20100225.1 - Rebuilt with superlu_dist 2.4 * Thu Mar 04 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.3-alt1.hg20100225 - Version 1.0.3 - Added pickles package * Tue Jan 05 2010 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt8.hg20091030.3 - Rebuild with new NumPy * Wed Dec 16 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt8.hg20091030.1.M51.1 - Port for branch 5.1 * Sun Dec 06 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt8.hg20091030.2 - Rebuild with Trilinos v10 * Mon Nov 16 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt8.hg20091030.1 - Rebuilt with python 2.6 * Wed Nov 04 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt8.hg20091030 - New snapshot * Mon Nov 02 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt7 - Rebuilt without udapl support * Tue Sep 08 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt6 - Rebuilt with PETSc-3.0.0_p7-alt6 - Fixed examples and added example modules * Tue Aug 18 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt5 - Rebuilt with PETSc-3.0.0_p7-alt5 * Tue Jul 28 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt4.1 - Renamed petsc4py-real-doc -> petsc4py-doc and petsc4py-real-examples -> petsc4py-examples * Sun Jul 19 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt3 - Moved module files from %python_sitelibdir into %ldir/python * Sat Jul 18 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt2 - Added link to Python module into PETSC_DIR/python * Tue Jul 14 2009 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.0.2-alt1 - Initial build for Sisyphus |