[reportlab-users] _rl_accel location

Robin Becker reportlab-users@reportlab.com
Tue, 22 Apr 2003 15:05:35 +0100


In article <000b01c308d8$0afb5ef0$03000000@over>, Ury Marshak <urym@two-
bytes.com> writes
>Regarding the location of _rl_accel, under 
>'site-packages\reportlab\lib' directory, or
>directly under ''site-packages'.
>
>It seems that some of the modules allow _rl_accel.pyd
>to be located in two places, using code similar to:
>try:
>    try:
>        import _rl_accel
>    except ImportError, errMsg:
>        _checkImportError(errMsg)
>        from reportlab.lib import _rl_accel
>
>(these are lib/utils.py, pdfbase/pdfmetrics.py, pdfbase/pdfutils.py) ,
>while pdfbase/ttfonts.py looks *only* in reportlab.lib,
>while paragraph.py - only *not* in reportlab.lib. 
>
>Looks a little inconsistent :)
>I personally would prefer to keep it under reportlab.lib -
>just to keep everything together, easing the maintainance.
>
>Ury
.... you're absolutely right, they're supposed to be dual location
because of the original schizophrenia over the standard DLLs location in
windows. Since distutils now seems to regard site-packages as the
default that's where I'm putting them hence the simple import _rl_accel.

I'm not sure I know how to make distutils refer to the eventual package
directory as the target for the binary extensions. 
-- 
Robin Becker