I finally got the kiva rpm to build.  I also got the docs and examples into the proper doc directory.

Here is what it took:

First, run "python setup.py bdist_rpm", which will fail with a list of installed but unpackaged files.  Somehow the full set of installed files isn't being recorded, probably because of some problem among numpy distutils, python distutils, setuptools, and Fedora rpm brp-python-bytecompile that isn't solved by the [install] optimize=1 option in setup.cfg (that works in most cases).

Then create a file (I called it problem_files) with a list of the installed but unpackaged files.  Also, create a new install script to be put into the rpm spec file that appends the problem file list to INSTALLED_FILES (where the installed files are recorded in the default spec file).

Then run the setup with options that use the new install script.

The rpm packaging of the docs files is just another option to the setup run.

Below are the relevant scripts and files.

I think I may still have a problem with the enthought namespace __init__.py and the nspkg.pth file that will presumably be fixed in an upcoming version of setuptools.  BTW, I don't know what effect this has, but there are also __init__.pyc and __init__.pyo files packaged into the rpm with the namespace file.  IIRC it may not be supposed to be there, but it got in somehow, probably because of the same problem that caused the installed files to be incorrectly recorded.


Stan Klein

-------------------------------------------------------------------------------------

The setup command line:

python setup.py bdist_rpm --doc-files=" examples/  docs/ "  --install=install_script2


install_script2 is:

python setup.py install --single-version-externally-managed --root=$RPM_BUILD_ROOT --record=INSTALLED_FILES
cat /home/stan/new-enthought-svn/enthought.branches/enthought.kiva_2.0/problem_files >> INSTALLED_FILES

problem_files is:

/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/affine_matrix_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/affine_matrix_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/clip_to_rect_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/clip_to_rect_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/compiled_path_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/compiled_path_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/gcmemtest.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/gcmemtest.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/graphics_context_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/graphics_context_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/image_test_case.pyc  
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/image_test_case.pyo  
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/join_stroke_path_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/join_stroke_path_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/points_in_polygon_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/points_in_polygon_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/rgba_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/rgba_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/stroke_path_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/stroke_path_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_arc.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_arc.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_draw_dash.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_draw_dash.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_ft.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_ft.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_graphics_context_system.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_graphics_context_system.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_image3.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_image3.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_save.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_save.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_utils.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/test_utils.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/unicode_font_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/agg/tests/unicode_font_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/tests/affine_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/tests/affine_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/tests/basecore2d_test_case.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/tests/basecore2d_test_case.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/tests/mac_simpletest.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/tests/mac_simpletest.pyo
/usr/lib/python2.4/site-packages/enthought/kiva/tests/macport_test.pyc
/usr/lib/python2.4/site-packages/enthought/kiva/tests/macport_test.pyo