Skip to content

Commit

Permalink
Set pythonpath based on sys
Browse files Browse the repository at this point in the history
  • Loading branch information
charnley committed Mar 29, 2024
1 parent 0199d3a commit d26f553
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os
import subprocess
import sys
from pathlib import Path

f90_modules = {
Expand Down Expand Up @@ -73,7 +74,9 @@ def main():
stem = path.stem

cwd = Path("src/qmllib") / parent
cmd = ["python", "-m", "numpy.f2py", "-c"] + flags + module_sources + ["-m", str(stem)]
cmd = (
[sys.executable, "-m", "numpy.f2py", "-c"] + flags + module_sources + ["-m", str(stem)]
)
print(cwd, " ".join(cmd))

proc = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True)
Expand Down

0 comments on commit d26f553

Please sign in to comment.