[Distutils] I finally got the kiva rpm to build using bdist_rpm

Stanley A. Klein sklein at cpcug.org
Tue Aug 21 16:31:52 CEST 2007

On Mon, 2007-08-20 at 18:47 -0400, Phillip J. Eby wrote:
> At 05:15 PM 8/20/2007 -0400, Stanley A. Klein wrote:
> >The overall kiva package is built by a combination of numpy distutils
> >setuptools.  There are multiple setup.py files involved because of the
needs of numpy distutils for compiling the extensions.  Somehow the
setup() of the main setup.py is used by both numpy distutils and
setuptools.  The relevant import statements are
> >
> >import setuptools
> >from numpy.distutils.core import setup
> >
> >The tests directory under kiva is referenced in the setup.py
> >configuration() there as config.add_data_dir('tests').  There is a
> >statement in the setup.py file under kiva/agg.
> Okay, that's why they're not working -- and it doesn't matter whether 
it's plain distutils, numpy distutils, or setuptools; their compiled 
forms won't be included in the installation manifest if you list them 
as data files, because none of those packages will *compile* the .py 
files -- only the Fedora bytecode compile thing will.
> The only workarounds I see are to:
> 1. Install them as legitimate modules, not data files, (in which case 
distutils/setuptools will compile them and list them in the manifest),
> OR:
> 2. Don't give them .py extensions -- they'll get listed, but not 
compiled by anything.
> These seem to be the only choices to work around the hostile bytecode 
compiler script in Fedora.

I tried your first "workaround" and it worked.  :-)

Dave Peterson had suggested commenting out config.add_data_dir('tests') in
the two setup.py files or replacing it with

I thought I had tried both.  Obviously, I had tried the first but not the
second.  :-(


Stan Klein

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20070821/a94fbe22/attachment.htm 

More information about the Distutils-SIG mailing list