Ronald Oussoren wrote:
It would be better to post ctypes issues on bugs.python.org, that way the issue 
won't get lost and all python contributers can see the issue and work on it.


Agreed, though I think the case I'm thinking of is more an issue with the package than with ctypes itself -- ctypes can only do so much.

(the case is the PyEnchant package, with wraps the enchant spell checking library, which wraps various actual spell checking libs -- it's a bit of a mess, inherently). If anyone cares, I've messed with this to get spell shccking workign with the Peppy editor. I haev yet to get a proper py2app build of Peppy, which I would like to do, but haven't found the time.


Dynamic imports will always be a problem, and we need a way to
specify the required behaviour in the setup.py script. As an example, when I use
SQLAlchemy in a project there should be a clean way to specify which
drivers I want in the setup.py script, and the SQLAlchemy recipe should
have a way to get to this information and should also have a way to
error out when the user hasn't specified which database drivers he wants.

yup -- another issue I"ve run into is packages that rely on setuptools "require" -- at least I think it's "require" -- anyway, I built a Pylons-based app, and it was a serious pain because it uses setuptools to determine which versions of various things to use at runtime -- so to get it all to work, you need to include all kinds of stuff you aren't using in the bundle -- various deprecated packages, etc. Personally, I think that's a bug in Pylons -- it should do version and package selection at install time, not run time, so I don't know that py2app should work around that kind of mess.

And if the dynamic import is part of your own code, then it
shouldn't
be a recipe anyway.

Maybe, maybe not. I wouldn't mind adding a public API for external
recipes, that way you could add recipes for your own libraries.

I like that idea.

As for py2app, maybe the ctypes recipe could patch ctypes to look
in a particular place in the bundle, and then the user could
specify which libs ctypes used, and py2ap would put them in the
bundle.
Yes, but that will require some additional trickery to ensure that
ctypes looks in this special location before looking at the full name
specified by the caller.
yup. Maybe not worth it.

I haven't looked at the ctypes code yet. I would be worth it if it
can be done with little effort, but not when it requires major
engineering.

If you can find the time, that would be great!


Thanks again for all your work in this.

-Chris



--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to