<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.10.1">
</HEAD>
<BODY>
On Mon, 2007-08-20 at 18:47 -0400, Phillip J. Eby wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="1">--><FONT COLOR="#000000">At 05:15 PM 8/20/2007 -0400, Stanley A. Klein wrote:</FONT>
<FONT COLOR="#000000">&gt;The overall kiva package is built by a combination of numpy distutils and</FONT>
<FONT COLOR="#000000">&gt;setuptools.  There are multiple setup.py files involved because of the</FONT>
<FONT COLOR="#000000">&gt;needs of numpy distutils for compiling the extensions.  Somehow the</FONT>
<FONT COLOR="#000000">&gt;setup() of the main setup.py is used by both numpy distutils and</FONT>
<FONT COLOR="#000000">&gt;setuptools.  The relevant import statements are</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;import setuptools</FONT>
<FONT COLOR="#000000">&gt;from numpy.distutils.core import setup</FONT>
<FONT COLOR="#000000">&gt;</FONT>
<FONT COLOR="#000000">&gt;The tests directory under kiva is referenced in the setup.py</FONT>
<FONT COLOR="#000000">&gt;configuration() there as config.add_data_dir('tests').  There is a similar</FONT>
<FONT COLOR="#000000">&gt;statement in the setup.py file under kiva/agg.</FONT>

<FONT COLOR="#000000">Okay, that's why they're not working -- and it doesn't matter whether </FONT>
<FONT COLOR="#000000">it's plain distutils, numpy distutils, or setuptools; their compiled </FONT>
<FONT COLOR="#000000">forms won't be included in the installation manifest if you list them </FONT>
<FONT COLOR="#000000">as data files, because none of those packages will *compile* the .py </FONT>
<FONT COLOR="#000000">files -- only the Fedora bytecode compile thing will.</FONT>

<FONT COLOR="#000000">The only workarounds I see are to:</FONT>

<FONT COLOR="#000000">1. Install them as legitimate modules, not data files, (in which case </FONT>
<FONT COLOR="#000000">distutils/setuptools will compile them and list them in the manifest),</FONT>

<FONT COLOR="#000000">OR:</FONT>

<FONT COLOR="#000000">2. Don't give them .py extensions -- they'll get listed, but not </FONT>
<FONT COLOR="#000000">compiled by anything.</FONT>

<FONT COLOR="#000000">These seem to be the only choices to work around the hostile bytecode </FONT>
<FONT COLOR="#000000">compiler script in Fedora.</FONT>
</PRE>
</BLOCKQUOTE>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->I tried your first &quot;workaround&quot; and it worked.&nbsp; :-)<BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->Dave Peterson had suggested commenting out config.add_data_dir('tests') in the two setup.py files or replacing it with config.add_subpackage('tests').&nbsp; <BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->I thought I had tried both.&nbsp; Obviously, I had tried the first but not the second.&nbsp; :-(<BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->Thanks.<BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">-->Stan Klein<BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
<!--+GtkHTML:<DATA class="ClueFlow" key="orig" value="0">--><BR>
</BODY>
</HTML>