conda-forge / cctbx-base-feedstock

A conda-smithy repository for cctbx-base.
BSD 3-Clause "New" or "Revised" License
1 stars 6 forks source link

ccp4io/ccp4io_adaptbx present but not configured #11

Open Anthchirp opened 3 years ago

Anthchirp commented 3 years ago
>>> import libtbx.load_env
>>> libtbx.env.has_module("ccp4io")
False
>>> libtbx.env.has_module("ccp4io_adaptbx")
False
>>> import ccp4io_adaptbx
>>> ccp4io_adaptbx       
<module 'ccp4io_adaptbx' from '(PREFIX)/lib/python3.8/site-packages/ccp4io_adaptbx/__init__.py'>

however

$ ls -d (PREFIX)/lib/python3.8/site-packages/ccp4io*
lib/python3.8/site-packages/ccp4io  lib/python3.8/site-packages/ccp4io_adaptbx

Does it make sense for the packages to be both present and not configured?


Environment (conda list):

$ conda list
...
cctbx-base                2020.10          py38hc79ae55_0    conda-forge
...
bkpoon commented 3 years ago

So, that part of has not been fully fleshed out. I can add extra logic for the has_module function to return True for installed modules. You can check the dist_path function for now.

import libtbx.load_env

e = libtbx.env

e.dist_path('ccp4io')

The idea will be that software that uses cctbx-base will not need to modify the environment object at all. As long as the modules are installed in the correct place, the environment object will think it is configured.

Anthchirp commented 3 years ago

I noticed this because of a failing test, but the relevant line is in iotbx: https://github.com/cctbx/cctbx_project/blob/master/iotbx/mtz/extract_from_symmetry_lib.py#L7

bkpoon commented 3 years ago

I'll add the extra logic for completeness to the 2020.11 release which should be starting soon.

Anthchirp commented 3 years ago

Thank you. There is no rush on this