Re: cctbx debian package
Le 18/07/2012 12:11, Radostan Riedel a écrit :
> On Wed, 18. Jul 10:51, Picca Frédéric-Emmanuel wrote:
>> can you explaine a little bit what is going on, the name of the patch
>> says adding setup.py but there is this massif cctbx_sources/pycbf.py
> I moved a file that normally lies in BUILDIR/lib. And I also moved stdlib.py.
> I don't know why but upstream is spreading files around directories and sets
> PYTHONPATH because they want to do:
> import pycbf
> I thought it's the best way to just move that file to the top directory.
> Did I do it wrong? I simply "cp" that file to the top directory.
> I first try to move that file in the setup.py with shutil but I found it a
> little bit too hacky. I don't know how to do that with distutils but probably
> Baptiste will figure it out ;).
I had overlooked this pycbf.py file, and thought only .so extensions
existed in lib. Now, it looks like this file is automatically generated,
so it should definitely not be included in the patch. I'll see how to
move it with distutils, I don't think it will be difficult.
> There are also 2 directories that should be moved (boost_adaptbx/boost -->
> boost, clipper_adaptbx/clipper --> clipper) I solved this with distutils but we
> can consider moving them when we do a repack and remove clipper, boost
OK, this is the "boost" question I asked in a previous e-mail. To answer
Frédéric's question: unless I'm mistaken, the code stems from the cctbx
project. The Boost project don't seem to distribute a python package for
their own project (as opposed to python packages built *with* Boost), so
it might be acceptable to hijack the name, even though I'm not 100%
confortable with it. Same goes for clipper.
Radi, a question for you about this: moving boost_adaptbx/boost to boost
means it can be imported with "import boost", but no more with "from
boost_adaptbx import boost". Unless I'm mistaken, the upstream packaging
allows both. Should we not do the same (a .pth file allows that)?
* I had understood that we would create several debian packages for the
python interface. This is the reason why I created several setup-xx.py
scripts. Do you think we should rather build a single python-cctbx
package, or is it just a temporary fix.
* your setup.py uses "extra_path = 'cctbx'". Will this not force users
to write (for example) "import cctbx.cctbx.sgtbx" instead of "import
cctbx.sgtbx"? Or is there something I overlooked?
What I'll try to do until the end of the week:
* fix the pycbf.py and stdlib.py problems
* move the .so extensions back to the root of the package, so that they
are directly importable (needed for scitbx.array_family.flex)
* use distutils to add a "from __future__ import division" line to the
files that lack it.
I'll tell you when this is done, so you can update your patch.