Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #14424

Re: dxtbx pytest issue

From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject Re: dxtbx pytest issue
Date 2022-09-01 15:10 +0200
Message-ID <F0S7f-4zi1-3@gated-at.bofh.it> (permalink)
References <F0QRP-4ykR-1@gated-at.bofh.it> <F0Rbb-4yHf-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


For the record, I found it..., the upstream modify the HDF5_PLUGIN_PATH when loading the dxtbx module.

they guess that they are using conda and override the path. All this is useless on Debian since the plugin are system installed properly.

Cheers

Fred


# Ensures that HDF5 has the conda_base plugin path configured.
#
# Ideally this will be properly configured by the conda environment.
# However, currently the dials-installer will not install a path-correct
# conda_base folder, so it needs to be updated manually.

_hdf5_plugin_path = libtbx.env.under_base(os.path.join("lib", "hdf5", "plugin"))

# Inject via the environment if h5py not used yet, or else use h5py
if "h5py" not in sys.modules:
    os.environ["HDF5_PLUGIN_PATH"] = (
        _hdf5_plugin_path + os.pathsep + os.getenv("HDF5_PLUGIN_PATH", "")
    )
else:
    # We've already loaded h5py, so setting the environment variable won't work
    # We need to use the h5py API to add a plugin path
    import h5py

    h5_plugin_paths = [h5py.h5pl.get(i).decode() for i in range(h5py.h5pl.size())]
    if _hdf5_plugin_path not in h5_plugin_paths:
        h5py.h5pl.prepend(_hdf5_plugin_path.encode())

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

dxtbx pytest issue PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-09-01 13:50 +0200
  Re: dxtbx pytest issue Neil Williams <codehelp@debian.org> - 2022-09-01 14:10 +0200
    Re: dxtbx pytest issue PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-09-01 15:00 +0200
    Re: dxtbx pytest issue PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2022-09-01 15:10 +0200

csiph-web