[Numpy-discussion] numpy-1.6.2: python setup.py build bdist_rpm fails

Ralf Gommers ralf.gommers@gmail....
Sat Oct 6 06:56:37 CDT 2012


On Fri, Oct 5, 2012 at 10:45 PM, Ed Sexton <sextonhadoop@gmail.com> wrote:

>
> Hello Numpy Group-
>
> 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.
>
> 1.  I cannot get the RPM build command to work, error listed below.
>
> 2.  Another issue, how do you pass --fcompiler=gnu95 to bdlist_rpm?  I
> have everything compiled under fcompiler.
>
> # python setup.py build_bdist
>
> Tail of the error:
>
> <snip><snip><snip><snip>
> <snip><snip><snip><snip>
> RPM build errors:
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/array_from_pyobj/wrapmodule.c
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/.f2py_f2cmap
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_free.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_mod.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/foo_use.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/assumed_shape/precision.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/kind/foo.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo.f
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo_fixed.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/mixed/foo_free.f90
>     File listed twice:
> /usr/lib64/python2.6/site-packages/numpy/f2py/tests/src/size/foo.f90
>     Installed (but unpackaged) file(s) found:
> <snip><snip><snip><snip>
> <snip><snip><snip><snip>
>    /usr/lib64/python2.6/site-packages/numpy/tests/test_matlib.pyc
>    /usr/lib64/python2.6/site-packages/numpy/tests/test_matlib.pyo
> error: command 'rpmbuild' failed with exit status 1
>
> Full Error on Pastebin:
> http://paste.ubuntu.com/1262671/
>
>
> Thanks for your ideas/suggestions.
>

No idea why that happens, but I think you could work around it by fixing up
the list of installed files.

1. `python setup.py install bdist_rpm --spec-only` gives you the spec file.
Looks like:

  <snip>
  %install
  python setup.py install -O1 --root=$RPM_BUILD_ROOT
--record=INSTALLED_FILES

  %clean
  rm -rf $RPM_BUILD_ROOT

  %files -f INSTALLED_FILES
  %defattr(-,root,root)

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.

3. Run:
  python setup.py install bdist_rpm --source-only
  python setup.py install bdist_rpm --binary-only

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20121006/81179108/attachment.html 


More information about the NumPy-Discussion mailing list