diff --git a/devtools/f2py_script.sh b/devtools/f2py_script.sh index bb19df1..3660b1d 100755 --- a/devtools/f2py_script.sh +++ b/devtools/f2py_script.sh @@ -28,7 +28,6 @@ done echo "Finding fortan dependencies" ORDERED_SOURCES=$(python3 $SOURCE_ROOT/devtools/order_fortran_dependencies.py ${SOURCES[@]}) -echo $ORDERED_SOURCES echo "Building PYF" $F2PY_EXE --quiet $ORDERED_SOURCES -m _fortran -h _fortran.pyf --overwrite-signature --build-dir $BUILD_DIR diff --git a/devtools/order_fortran_dependencies.py b/devtools/order_fortran_dependencies.py index 9c3d21b..d4c8b2d 100644 --- a/devtools/order_fortran_dependencies.py +++ b/devtools/order_fortran_dependencies.py @@ -129,13 +129,15 @@ def order_dependencies(self) -> List[str]: while True: moved = False for file in self.input_files: - file_pos = output_order.index(str(file)) + file_str = str(file) + file_pos = output_order.index(file_str) - for need in self.needs[str(file)]: + for need in self.needs[file_str]: need_pos = output_order.index(need) if need_pos > file_pos: - output_order[need_pos] = str(file) + output_order[need_pos] = file_str output_order[file_pos] = need + file_pos = need_pos moved = True if not moved: