Skip to content

Commit

Permalink
Try going back to a temp folder
Browse files Browse the repository at this point in the history
  • Loading branch information
rjfarmer committed Dec 3, 2023
1 parent a47a832 commit a5c58c9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gfort2py/fCompile.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ def shared_lib_flags():
def library(lib, file, output, FC, FFLAGS, LDLIBS, LDFLAGS):
local_file = os.path.basename(file)

if os.path.exists(os.path.join(output, lib)):
os.remove(os.path.join(output, lib))

line = " ".join(
[FC, FFLAGS, *shared_lib_flags(), LDFLAGS, LDLIBS, "-o", lib, local_file]
)
Expand Down Expand Up @@ -138,7 +135,8 @@ def mod_name(file):

def output_folder(output):
if output is None:
return platformdirs.user_cache_dir("gfort2py")
# return platformdirs.user_cache_dir("gfort2py")
return tempfile.mkdtemp(prefix="gfort2py")
else:
return os.path.realpath(output)

Expand Down

0 comments on commit a5c58c9

Please sign in to comment.