<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=us-ascii" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Robert Bradshaw wrote:
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">On Aug 1, 2007, at 5:55 PM, Billy G. Allie wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">
This implementation of Pyrex.Distutils will:
put the generated files (*.c, *.h, *.pxi) into the [build_temp]/ 
pyrex directory (unless the --inplace option is used).
add the following Pyrex specific command-line options:
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm not sure I like this (especially for the default).
  </pre>
</blockquote>
I know I don't like the generated files to be placed same directory as
the source code. <br>
An additional parameter (perhaps 'pyrex-output-dir') could be added to
allow the output directory to be specified if the<br>
[build_temp]/pyrex directory is not desired.<br>
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">pyrex-include-dirs: a list of directories that Pyrex will search  
for include files (the -I option of pyrexc)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This is only necessary in the above case, right?
  </pre>
</blockquote>
No.&nbsp; For example, in the libpq extension module, I use two include
(.pxd) files [clibpq.pxd &amp; pyCAPI.pxd].&nbsp; The directory structure
used for the source code is:<br>
<blockquote>Projects<br>
&nbsp;&nbsp;&nbsp; pypgsql3<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; trunk<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; inlcude<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; pyPgSQL<br>
</blockquote>
with the .pxd files in the include directory and the pyrex source
[pyPgSQL.libpq.pyx] in the pyPgSQL directory.&nbsp; This has nothing to do
with where the generated files are placed..<br>
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">pyrex-cplus: tells Pyrex to use the C++ compiler to compile the  
generated file.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Is this not handled by the "language" parameter in the  
distutils.core.Extension used in setup.py
  </pre>
</blockquote>
If Pyrex is not told to use the C++ compiler, it will generate a '.c'
file instead of a '.cpp' file.<br>
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">
  </pre>
  <blockquote type="cite">
    <pre wrap="">pyrex-create-listing: tells Pyrex to place error messages in a  
listing (.lis) file.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
I'm not sure this should be an extra option--it can be accomplished  
easier by piping to a file (or something else for that manner).
  </pre>
</blockquote>
Basically, the pyrex- options were added to allow the existing options
for the Pyrex compiler to be&nbsp; given in the setup.py file.&nbsp; The pyrex
compiler accepts an option to generate a listing file, so this option
exists.<br>
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">
Currently in Cython one can do cross-directory imports (like in  
python--essential for a project with 100's of extension modules), and  
this doesn't look like it respects that.
  </pre>
</blockquote>
The pyrex-include-dirs option only specifies additional directory to
search for include files (i.e. the -I option to pyrexc).<br>
<blockquote
 cite="mid9E014461-A417-463D-98D3-74A445626ADD@math.washington.edu"
 type="cite">
  <pre wrap="">
- Rober</pre>
</blockquote>
<br>
</body>
</html>