| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Co-authored-by: sbillinge <4254545+sbillinge@users.noreply.github.com>
Co-authored-by: sbillinge <4254545+sbillinge@users.noreply.github.com>
Co-authored-by: sbillinge <4254545+sbillinge@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
What problem does this PR address?
Python 3.8+ restricts DLL loading on Windows to specific directories for security. Extension module srreal_ext cannot find dependencies (libdiffpy.dll, libObjCryst.dll, Boost, GSL) installed in %CONDA_PREFIX%\Library\bin, causing import failures.
What should the reviewer(s) do?
Review the Windows-specific initialization added to __init__.py and verify:
Changes:
Example:
This section details on the original issue you should resolve
<issue_title>srreal DLL not loading properly on windows</issue_title>
<issue_description>### Problem
I am getting this when I try and run tests in pdfbl-sequential on windows:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ #!/usr/bin/env python ############################################################################## # # diffpy.srreal by DANSE Diffraction group # Simon J. L. Billinge # (c) 2010 The Trustees of Columbia University # in the City of New York. All rights reserved. # # File coded by: Pavol Juhas # # See AUTHORS.txt for a list of people who contributed. # See LICENSE_DANSE.txt for license information. # ############################################################################## """ Top-level classes for PDF calculation: DebyePDFCalculator -- simulate PDF by evaluating Debye sum in Q-space PDFCalculator -- calculate PDF by peak summation in real space """ > from diffpy.srreal.srreal_ext import ( DebyePDFCalculator, PDFCalculator, fftftog, fftgtof, ) E ImportError: DLL load failed while importing srreal_ext: The specified module could not be found. ..\..\micromamba\envs\pdfbl\Lib\site-packages\diffpy\srreal\pdfcalculator.py:21: ImportError ====================================================== short test summary info ====================================================== FAILED tests/test_pdfadapter.py::test_pdfadapter - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found. FAILED tests/test_sequential_cmi_runner.py::test_load_inputs_bad - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found. FAILED tests/test_sequential_cmi_runner.py::test_run_sequential_cmi_runner - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found. FAILED tests/test_sequential_cmi_runner.py::test_data_for_plot - ImportError: DLL load failed while importing srreal_ext: The specified module could not be found. ========================================================= 4 failed in 7.15s =========================================================Proposed solution
Figure out why and fix it. Here is the env list: