#-*- mode: org -*-
* DONE [3/3] fix all the scripts (wrong path) maybe the best solution is to patch the script generator.
  - [X] removed the export of LIBTBX_BUILD in order to find the installed libtbx_env file.
  - [X] fix the patch to make the script works out of the box
  - [X] install all the .sh script. (only .py scripts are install for now)
* TODO [2/3] unit test
** DONE install all tst_*.py
   some of the tst_* files are installed in the python modules
   tree. nevertheless they are not part of the modules (their
   directory does not contain an __init__.py file

   the unit test rely on the presence of these files here, so we need
   to install all of them manually.
** DONE RuntimeError: cctbx Error: MTZ file read error: tst_diffuse.mtz
   libtbx.python "/usr/lib/python3/dist-packages/cctbx/regression/tst_diffuse.py" [FAIL] 1.0s
     Time:  0.98
     Return code: 1
     OKs: 0
     Standard error:
       Traceback (most recent call last):
         File "/usr/lib/python3/dist-packages/cctbx/command_line/diffuse.py", line 183, in <module>
           run(sys.argv[1:])
         File "/usr/lib/python3/dist-packages/cctbx/command_line/diffuse.py", line 57, in run
           diffuse(
         File "/usr/lib/python3/dist-packages/cctbx/command_line/diffuse.py", line 163, in write_mtz_file
           mtz_dataset = ma.as_mtz_dataset(column_root_label="I")
         File "/usr/lib/python3/dist-packages/cctbx/miller/__init__.py", line 4805, in as_mtz_dataset
           return iotbx.mtz.miller_array_as_mtz_dataset(self,
         File "/usr/lib/python3/dist-packages/iotbx/mtz/__init__.py", line 1149, in miller_array_as_mtz_dataset
           mtz_object = object() \
         File "/usr/lib/python3/dist-packages/iotbx/mtz/__init__.py", line 268, in set_space_group_info
           symbol = extract_from_symmetry_lib.ccp4_symbol(
         File "/usr/lib/python3/dist-packages/iotbx/mtz/extract_from_symmetry_lib.py", line 59, in ccp4_symbol
           assert found_at_least_one_lib
       AssertionError
       Traceback (most recent call last):
         File "/usr/lib/python3/dist-packages/cctbx/regression/tst_diffuse.py", line 129, in <module>
           exercise()
         File "/usr/lib/python3/dist-packages/cctbx/regression/tst_diffuse.py", line 116, in exercise
           mas = iotbx.mtz.object(file_name="tst_diffuse.mtz").as_miller_arrays()
       RuntimeError: cctbx Error: MTZ file read error: tst_diffuse.mtz

       the python modules was looking for libccp4 data at the wrong place.
** TODO [0/1] missing modules
   - [ ] need to package https://github.com/ccpem/mrcfile
* TODO [0/1] annlib
  - [ ] need to deal with the self_annlib ???, which is the annlib but
    build with a different env set. Maybe the best solution would be
    to produce the second version of this annlib library from the
    annlib package.
* TODO [1/2] cpp4io
  - [ ] the ccp4c library is modifyed in order to be compiled as the
    ccp4io library. for now only use the official ccp4c library and
    see if all the unit test pass.
  - [X] thr ccp4io library is a Shared library on Debian.
* TODO libtbx_env
  the strategy is wrong other packages use a cmake findCCTBX
  script. the idea is not to chabge the libtbx_env filename but to
  install the different version under different directory.
* TODO soname
  Need to patch the library to add the soname for each of them like this
  patchelf --set-soname libnewname.so.3.4.5 path/to/libmylibrary.so.1.2.3
* TODO /usr/share/cctbx -> /urs/lib/cctbx
  the build directory contain also binaries (unit test executables)
