<!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">
Stefan Behnel wrote:
<blockquote cite="mid46B3309F.4070002@behnel.de" type="cite">
  <pre wrap="">Hi,

Billy G. Allie wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I've implesmentd a new version of
buld_ext.py and created a version of core.py and extension.py.
    </pre>
  </blockquote>
  <pre wrap=""><!---->
first thing I noticed when running a patched Cython: setuptools break. They
already patch into distutils, so the patching in your code doesn't work. I
would prefer doing without changes to core.py and extensions.py. AFAICT, this
removes the support for configuring import directories at the Extension level.

Alternatively, we could also import things from setuptools first and only fall
back to distutils. However, this would bug people who have setuptools
installed and want to build with distutils (for whatever reason, don't know
how common that is).

I'll take a deeper look into this.

Stefan
  </pre>
</blockquote>
Stefan,<br>
<br>
I've looked at the setuptools source.&nbsp; Since setuptools is importing
Pyrex.Distutils to perform work, setuptools will have to be patched to
work with the new code.&nbsp; From my initial walkthrough of the code (by no
meas through), it appeas that the only change would be to change
occurances of 'distutils.core' to 'Pyrex.Distutils.core', wrapped in a
try ... except statement.&nbsp; For example:<br>
<blockquote><tt>try:<br>
&nbsp;&nbsp;&nbsp; from Pyrex.Distutils.core import Extension<br>
except ImportError:<br>
&nbsp;&nbsp;&nbsp; from distutils.core import Extension<br>
  </tt>-- or --<br>
  <tt>try:<br>
&nbsp;&nbsp;&nbsp; import Pyrex.Distutils.core<br>
except ImportError:<br>
&nbsp;&nbsp;&nbsp; import distutils.core</tt><br>
</blockquote>
The files that would have to change are:<br>
<blockquote>command/upload.py<br>
command/easy_install.py<br>
dist.py<br>
extension.py<br>
__init__.py<br>
package_index.py<br>
tests/__init__.py<br>
</blockquote>
Extension is always importted from core, so with the change stated
above it will always get the correct Extension class.<br>
build_ext is already imported from Pyrex.Distutils.<br>
</body>
</html>