[MERGE] Better warnings when pyrex is not available
Martin Pool
mbp at sourcefrog.net
Mon Jul 16 10:41:53 BST 2007
On 7/16/07, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Since have finally merged our first Pyrex extension into bzr, we have now
> started running into the user difficulties.
>
> Erik de Castro Lopo was having difficulties running 'python setup.py install'
> because he didn't have Pyrex installed, and we aren't versioning the .c files.
>
> The attached patch changes the 'make' step in the following ways:
>
> 1) Pyrex is available has no changes:
> % make
> building extension modules.
> python setup.py build_ext -i
> running build_ext
> building 'bzrlib._knit_load_data_c' extension
> ... (gcc lines)
>
>
> 2) Pyrex not available, but the .c files are present (such as in a release):
> building extension modules.
> python setup.py build_ext -i
>
> The python package 'Pyrex' is not available. If the .c files are available,
> they will be built, but modifying the .pyx files will not rebuild them.
>
> running build_ext
> building 'bzrlib._knit_load_data_c' extension
> ... (gcc lines)
>
> 3) Pyrex not available, and .c files not present (bzr.dev):
> building extension modules.
> python setup.py build_ext -i
>
> The python package 'Pyrex' is not available. If the .c files are available,
> they will be built, but modifying the .pyx files will not rebuild them.
>
> C extension(s) not found:
> bzrlib/_knit_load_data_c.c
> The python versions will be used instead.
>
> running build_ext
>
> I hope this makes it a little more obvious what people can do to fix the
> situation, as well as not interrupting them if they don't want them.
+1 to the patch. BB missed it for some reasons.
> Also, do you think we should be adding a 'trace.mutter()' comment during the
> try/import section (when trying to load a compiled extension?). We have them
> for other missing dependencies like cElementTree and pycurl. Thoughts?
I think so. Maybe we should make it more prominent than that? End
users probably won't ever see them. But showing it on every
invocation is too much.
Also, I think you mentioned that pycurl is probably not really a good
deal now urllib is so much better?
--
Martin
More information about the bazaar
mailing list