[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cctbx debian package

On Mon, 16. Jul 14:37, Baptiste Carvello wrote:
> I thought about it more, and I think I created the problem myself :-)
> Upstream import the extensions a little bit differently from the
> typical python project. Usually, extensions .so files are located inside
> the package directory where they belong. In cctbx, all .so file are in a
> lib directory, which is added to PYTHONPATH (even though the .so are not
> meant to be imported directly by the users), and then an import stub
> imports the objects to their final place.
> At first, without much thinking, I did the usual python way and moved
> the .so files into the packages. But in fact, there is nothing broken in
> letting them in the python path (apart from a small namespace pollution,
> but that doesn't justify diverging from upstream). So I'll just install
> them in the python path and the problem is solved.
My first idea was to put the ext files into cctbx_source dir, move
boost_adaptbx/boost and clipper_adaptbx/clipper dirs to cctbx_source and run a setup.py.
setuptools should create automatically a pth file to find everything in the
cctbx subdir where the *.so files are located in. Then it should be just good to
import annlib_ext
from cctbx import cctbx

This should keep the upstreams logic. I think the problem why upstream didn't
put boost and clipper dirs in cctbx_source dir is because they are shipping
clipper and boost src's within that directories. We can also rethink this stuff
while we start to repack the package. With the latest commits it should be
possible to remove boost and clipper. I'm going to read up on debians repacking
policy to be prepared for that.

BTW: Baptiste did you ask to be part of Debian Science yet? Would be great if
you could push your great work into cctbx git.


Reply to: