Read about our upcoming Code of Conduct on this issue

Commit 8504e0d8 authored by Pierre Augier's avatar Pierre Augier
Browse files

Fix issue #23 FileNotFound _pythran-fluid

parent 5bc1e790f060
......@@ -28,6 +28,7 @@ import time
import subprocess
import os
import functools
import sys
from .util import (
get_module_name,
......@@ -245,7 +246,13 @@ class FluidPythran:
# better to do this in another process because the file is already run...
os.environ["FLUIDPYTHRAN_NO_MPI"] = "1"
returncode = subprocess.call(
["fluidpythran", "-np", str(path_mod)]
[
sys.executable,
"-m",
"fluidpythran.run",
"-np",
str(path_mod),
]
)
del os.environ["FLUIDPYTHRAN_NO_MPI"]
returncode = mpi.bcast(returncode)
......
......@@ -29,6 +29,7 @@ import time
from typing import Union, Iterable, Optional
import sysconfig
import hashlib
import sys
from .compat import open, implementation
from . import mpi
......@@ -135,7 +136,12 @@ class SchedulerPopen:
if openmp:
update_flags("-fopenmp")
words_command = ["_pythran-fluid", path.name]
words_command = [
sys.executable,
"-m",
"fluidpythran_cl.run_pythran",
path.name,
]
if name_ext_file is None:
name_ext_file = name_ext_from_path_pythran(path)
......
......@@ -140,3 +140,7 @@ def parse_args():
)
return parser.parse_args()
if __name__ == "__main__":
run()
"""Command line _pythran-fluid
==============================
"""Command line
===============
Internal API
------------
......@@ -24,7 +24,7 @@ ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") or ".so"
def main():
"""Minimal layer above the Pythran commandline"""
assert sys.argv[0].endswith("_pythran-fluid")
assert sys.argv[0].endswith("fluidpythran_cl/run_pythran.py")
args = sys.argv[1:]
......@@ -90,3 +90,7 @@ def main():
logger.error(
f"file {path_out.absolute()} has not been created by Pythran"
)
if __name__ == "__main__":
main()
......@@ -6,8 +6,11 @@ import platform
f"In >=2018, you should use a Python supporting f-strings!"
if platform.python_implementation() == "PyPy":
def run_path(path):
return run_path_(str(path))
else:
run_path = run_path_
......@@ -30,8 +33,5 @@ if path_data_tests.exists():
setup(
version=__version__,
packages=find_packages(exclude=["doc"]),
entry_points={
"console_scripts": ["fluidpythran = fluidpythran.run:run",
"_pythran-fluid = fluidpythran_cl.pythran_fluid:main"]
},
entry_points={"console_scripts": ["fluidpythran = fluidpythran.run:run"]},
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment