Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update mpi.pth after changes in Python 3.13 #527

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 2 additions & 20 deletions src/mpi.pth
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
# Add Intel MPI to Python 3.8+ DLL search path on Windows
import os; I_MPI_ROOT = os.getenv('I_MPI_ROOT')
import os; I_MPI_LIBRARY_KIND = os.getenv('I_MPI_LIBRARY_KIND')
import os; library_kind = os.getenv('library_kind')
import os; kind = I_MPI_LIBRARY_KIND or library_kind or 'release'
import os; d1 = I_MPI_ROOT and os.path.join(I_MPI_ROOT, 'bin', kind)
import os; d2 = I_MPI_ROOT and os.path.join(I_MPI_ROOT, 'bin')
import os; d1 = d1 and os.path.isfile(os.path.join(d1, 'impi.dll')) and d1
import os; d2 = d2 and os.path.isfile(os.path.join(d2, 'impi.dll')) and d2
import os; dlldir = d1 or d2
import os; add_dll_directory = getattr(os, 'add_dll_directory', None)
import os; add_dll_directory and dlldir and add_dll_directory(dlldir)
import sys; verbose = add_dll_directory and dlldir and sys.flags.verbose >= 1
import sys; verbose and print("# add DLL directory: ", dlldir, file=sys.stderr)
import sys, os; I_MPI_ROOT = os.getenv('I_MPI_ROOT'); I_MPI_LIBRARY_KIND = os.getenv('I_MPI_LIBRARY_KIND'); library_kind = os.getenv('library_kind'); kind = I_MPI_LIBRARY_KIND or library_kind or 'release'; d1 = I_MPI_ROOT and os.path.join(I_MPI_ROOT, 'bin', kind); d2 = I_MPI_ROOT and os.path.join(I_MPI_ROOT, 'bin'); d1 = d1 and os.path.isfile(os.path.join(d1, 'impi.dll')) and d1; d2 = d2 and os.path.isfile(os.path.join(d2, 'impi.dll')) and d2; dlldir = d1 or d2; add_dll_directory = getattr(os, 'add_dll_directory', None); add_dll_directory and dlldir and add_dll_directory(dlldir); verbose = add_dll_directory and dlldir and sys.flags.verbose >= 1; verbose and print("# add DLL directory: ", dlldir, file=sys.stderr)

# Add Microsoft MPI to Python 3.8+ DLL search path on Windows
import os; MSMPI_BIN = os.getenv('MSMPI_BIN')
import os; dll = MSMPI_BIN and os.path.join(MSMPI_BIN, 'msmpi.dll')
import os; dlldir = dll and os.path.isfile(dll) and MSMPI_BIN
import os; add_dll_directory = getattr(os, 'add_dll_directory', None)
import os; add_dll_directory and dlldir and add_dll_directory(dlldir)
import sys; verbose = add_dll_directory and dlldir and sys.flags.verbose >= 1
import sys; verbose and print("# add DLL directory: ", dlldir, file=sys.stderr)
import sys, os; MSMPI_BIN = os.getenv('MSMPI_BIN'); dll = MSMPI_BIN and os.path.join(MSMPI_BIN, 'msmpi.dll'); dlldir = dll and os.path.isfile(dll) and MSMPI_BIN; add_dll_directory = getattr(os, 'add_dll_directory', None); add_dll_directory and dlldir and add_dll_directory(dlldir); verbose = add_dll_directory and dlldir and sys.flags.verbose >= 1; verbose and print("# add DLL directory: ", dlldir, file=sys.stderr)
Loading