durusmail: quixote-users: Re: Installation docs (was Re: Draft of Quixote white paper)
Re: Draft of Quixote white paper (A.M. Kuchling)
2003-06-25
Installation docs (was Re: Draft of Quixote white paper)
2003-08-02
Re: Installation docs (was Re: Draft of Quixote white paper)
2003-08-02
2003-08-02
Re: Installation docs (was Re: Draft of Quixote white paper)
Graham Fawcett
2003-08-02
Greg Ward wrote:
> However, I would then turn that around argue that that's a feature.
> There really isn't much to installing Quixote!  A new installation under
> Python 2.2 or later is particularly simple: it's just the usual
> incantation,
>
>   python setup.py install
>

Agreed -- unless you're a Windows user in the likely position of not having a C
compiler installed.

Really, that setup script ought to be fixed. It's trivial to catch the
exception if the build of _c_htmltext fails, and switch over to the Python
implementation. The issue (and workarounds, and suggested patches) has come up
more than once on the list.

At the risk of sounding like a broken record, allow me to re-post my suggested
modification to setup.py:

        try:
            core.setup(**kw)

        except SystemExit, errmsg:
            if not kw.has_key('ext_modules'):
                raise
            else:
                print '\a'
                print 'Could not build C implementation of htmltext! Reason:'
                print errmsg
                print 'Failing over to Python implementation.'
                del kw['ext_modules']
                core.setup(**kw)

Far better than telling a Windows user to "mess around with the setup.py file
to disable the C extension". It may not win awards for elegance, but personally
I could live with that!

Please, quixotic powers that be, patch setup.py or devise a suitable
counterpatch.

Best wishes,

-- Graham



reply