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


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

Re: dxtbx pytest issue

Path csiph.com!1.us.feeder.erje.net!3.us.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!news.uzoreto.com!aioe.org!bofh.it!news.nic.it!robomod
From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject Re: dxtbx pytest issue
Date Thu, 01 Sep 2022 15:10:01 +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>
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Sep 1 13:00:39 2022
Old-Return-Path <frederic-emmanuel.picca@synchrotron-soleil.fr>
X-Amavis-Spam-Status No, score=-0.011 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, RCVD_IN_MSPIKE_H2=-0.001, THREADTOPIC=2, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate:hard: -5.5
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Mailer Zimbra 8.8.15_GA_4272 (ZimbraWebClient - FF91 (Linux)/8.8.15_GA_4257)
Thread-Topic dxtbx pytest issue
Thread-Index FJN0o+S3llYWGI/crGtRPA7V8xVV/g==
X-Renater-Ptge-Spamstate clean
X-Renater-Ptge-Spamcause gggruggvucftvghtrhhoucdtuddrgedvfedrvdekkedgheejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecutffgpfetvffgtfenuceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvvefkjghfufggtgfgofhtsehtjegttdertdejnecuhfhrohhmpefrkfevveetucfhrhgvuggvrhhitgdqgfhmmhgrnhhuvghluceofhhrvgguvghrihgtqdgvmhhmrghnuhgvlhdrphhitggtrgesshihnhgthhhrohhtrhhonhdqshholhgvihhlrdhfrheqnecuggftrfgrthhtvghrnhepfeejjeffgffhgfejudevvedtteffjeduudffvdffkeetffekhefhtdefhfefueefnecukfhppedutddrvdehgedrvdegtddrudegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedutddrvdehgedrvdegtddrudeghedphhgvlhhopeiishhtohhrvgdqsgefqddtuddvrdhprghrthgrghgvrdhrvghnrghtvghrrdhfrhdpmhgrihhlfhhrohhmpefrkfevveetucfhrhgvuggvrhhitgdqgfhmmhgrnhhuvghluceofhhrvgguvghrihgtqdgvmhhmrghnuhgvlhdrphhitggtrgesshihnhgthhhrohhtrhhonhdqshholhgvihhlrdhfrheqpdhnsggprhgtphhtthhopedvpdhrtghpthhtoheptghouggvhhgvlhhpseguvggsihgrnhdrohhrghdprhgtphhtthhopeguvggsihgrnhdqphihthhhohhnsehlihhsthhsrdguvggsihgrnhdrohhrgh
X-Mailing-List <debian-python@lists.debian.org> archive/latest/20264
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/638662503.3886031.1662036157461.JavaMail.zimbra@synchrotron-soleil.fr
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc debian-python <debian-python@lists.debian.org>
X-Original-Date Thu, 1 Sep 2022 14:42:37 +0200 (CEST)
X-Original-Message-ID <638662503.3886031.1662036157461.JavaMail.zimbra@synchrotron-soleil.fr>
X-Original-References <605521306.3759500.1662031956039.JavaMail.zimbra@synchrotron-soleil.fr> <20220901130312.728e52fd@felix.codehelp>
Xref csiph.com linux.debian.maint.python:14424

Show key headers only | 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