You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defformat_fortran_code(source: str) ->str:
"""Format fortran code using fprettify. The path to fprettify needs to be set explicitly for the non-Spack build process as Liskov does not activate a virtual environment. However, the PYTHON_PATH does not contain fprettify in a Spack build, hence the need for a special condition """bin_path=Path(PYTHON_PATH).parentif"spack"notinstr(bin_path):
fprettify_path=bin_path/"fprettify"else:
fprettify_path="fprettify"args= [str(fprettify_path)]
p1=subprocess.Popen(args, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
returnp1.communicate(source.encode("UTF-8"))[0].decode("UTF-8").rstrip()
is not correct, because PYTHONPATH points to /mch-environment/v3/linux-sles15-zen3/gcc-11.3.0/python-3.10.6-2df2crgellbveze7swvwq53xixcjle3i/bin/fprettify where fprettify does not exist.
Rather you find it in another location, since it is a separate Python module.
Why this work in case we install Python in the same build as icon4py is not known to me.
A possible solution could be to use some sort of which fprettify since it should be put in the build-env by Spack
The text was updated successfully, but these errors were encountered:
is not correct, because
PYTHONPATH
points to/mch-environment/v3/linux-sles15-zen3/gcc-11.3.0/python-3.10.6-2df2crgellbveze7swvwq53xixcjle3i/bin/fprettify
where fprettify does not exist.Rather you find it in another location, since it is a separate Python module.
Why this work in case we install Python in the same build as icon4py is not known to me.
A possible solution could be to use some sort of
which fprettify
since it should be put in the build-env by SpackThe text was updated successfully, but these errors were encountered: