[15:28:34] <rzoz> quick question: i'm porting an extension library from C to Cython, and while i do this i'm moving from setuptools back to distutils. does the following workflow for unit testing make sense, or is there something obvious i'm missing?
[15:35:56] <rzoz> AFAIK there don't seem to be any automagical additions to PYTHONPATH by distutils. i guess this way works, but it's also not something i saw (quite precisely at least) in the docs, so self.doubt().
[15:35:59] <J1m> Um, buildout and setuptools/distribute make development pretty straightfoward. Buildout sets python path for you.
[15:36:30] <J1m> I don't care to ponder how to make it harder. :)
[15:36:47] <J1m> maybe virtualenv makes it easy too -- not sure.
[15:43:36] <J1m> I get the feeling that people close to the Python core don't work on projects for which packaging is relevant. This is frustrating.
[15:44:39] <rzoz> that sounds right. packaging has always been a huge woe for me given existing tools, especially when it comes to dealing with edge cases involving .so files.
[15:45:24] <rzoz> and i was a little shocked when various folks told me to switch back to distutils, but figured i'd give it a shot...
[15:46:21] <J1m> Yeah. C extensions can hurt, especially if they a) depend on other C extensions, or b) depend on external libraries.
[15:46:53] <J1m> We have coping mechanisms that work, but it's still a challenge.
[15:47:44] <rzoz> i'm somewhat permanently stuck in b)-land and there's really no way around requiring $user to build their .so from source, stick it in the LD_LIBRARY_PATH, etc.
[15:51:20] <J1m> 1) Use the zc.recipe.egg:custom recipe, http://pypi.python.org/pypi/zc.recipe.egg/2.0.0a1#creating-eggs-with-extensions-needing-custom-build-settings, together with a automated build of the library, using something like zc.recipe.cmmi, or
[15:53:25] <J1m> 2) If the library is small, include it in the source distribution and do a static build, as was done in zc-zookeeper-static and pyzmq-static
[15:54:27] <rzoz> i think 2 is not an option due to licensing issues, but with 1 could i have it download, run a custom make, then install the resulting .so somewhere that python will see it?
[15:54:54] <rzoz> this is what i'm trying to simplify: http://code.google.com/p/python-zibopt/wiki/Installation
[15:56:36] <J1m> Yes. Use zc.recipe.cmmi (or one of the many variants) to build a buildout-local copy and then use the custom egg recipe (or something similar) to build the extension using the local library. You can use rpath to let the extension know where to find the library at run time.
[15:57:24] <rzoz> J1m: thanks! that'll remove a world of hurt. guess i have some homework now :)