<br><br><div class="gmail_quote">On Fri, Oct 5, 2012 at 10:45 PM, Ed Sexton <span dir="ltr"><<a href="mailto:sextonhadoop@gmail.com" target="_blank">sextonhadoop@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><div class="gmail_quote">Hello Numpy Group-<br><br>I have a working installation of Numpy-1.6.2 on a RHEL 6.3 host, now I have to create an RPM to push out to 600+ hosts.<br><br>1. I cannot get the RPM build command to work, error listed below.<br>
<br>2. Another issue, how do you pass --fcompiler=gnu95 to bdlist_rpm? I have everything compiled under fcompiler.<br><br># python setup.py build_bdist<br><br>Tail of the error:<br><br><snip><snip><snip><snip><br>
<snip><snip><snip><snip><br>RPM build errors:<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap<br>
File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_free.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_mod.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_use.f90<br>
File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/precision.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/kind/foo.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo.f<br>
File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo_fixed.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo_free.f90<br> File listed twice: /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/size/foo.f90<br>
Installed (but unpackaged) file(s) found:<br><snip><snip><snip><snip><br><snip><snip><snip><snip><br> /usr/lib64/python2.6/site-packages/numpy/tests/test_matlib.pyc<br>
/usr/lib64/python2.6/site-packages/numpy/tests/test_matlib.pyo<br>error: command 'rpmbuild' failed with exit status 1<br><br>Full Error on Pastebin: <br><a href="http://paste.ubuntu.com/1262671/" target="_blank">http://paste.ubuntu.com/1262671/</a><br>
<br><br>Thanks for your ideas/suggestions.<br></div></blockquote><div><br>No idea why that happens, but I think you could work around it by fixing up the list of installed files. <br><br>1. `python setup.py install bdist_rpm --spec-only` gives you the spec file. Looks like:<br>
<br> <snip><br> %install<br> python setup.py install -O1 --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES<br><br> %clean<br> rm -rf $RPM_BUILD_ROOT<br><br> %files -f INSTALLED_FILES<br> %defattr(-,root,root)<br>
<br></div></div>2. Write a script to fix up INSTALLED_FILES by removing duplicates and adding the missing files. Insert a call to that script after the clean step in the spec file.<br><br>3. Run:<br> python setup.py install bdist_rpm --source-only<br>
python setup.py install bdist_rpm --binary-only<br><br>Ralf<br><br>