Skip to content

Commit

Permalink
use temp folder for compiler test files
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Jan 6, 2025
1 parent 5fe0e36 commit 526d86f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import numpy as np
from Cython.Distutils import build_ext
import sys, os, subprocess, warnings, re
import tempfile


found_omp = True
Expand Down Expand Up @@ -279,7 +280,7 @@ def test_supports_compile_arg(self, comm, with_omp=False):
if not isinstance(comm, list):
comm = [comm]
print("--- Checking compiler support for option '%s'" % " ".join(comm))
fname = "cmfrec_compiler_testing.c"
fname = os.path.join(tempfile.gettempdir(), "cmfrec_compiler_testing.c")
with open(fname, "w") as ftest:
ftest.write(u"int main(int argc, char**argv) {return 0;}\n")
try:
Expand Down Expand Up @@ -311,7 +312,7 @@ def test_supports_clang_reassociate(self):
if not hasattr(self.compiler, "compiler"):
return False
print("--- Checking compiler support for option '%s'" % "#pragma clang fp reassociate(on)")
fname = "cmfrec_compiler_testing.c"
fname = os.path.join(tempfile.gettempdir(), "cmfrec_compiler_testing.c")
with open(fname, "w") as ftest:
ftest.write(u"int main(int argc, char**argv) {return 0;}\n")
try:
Expand Down Expand Up @@ -370,7 +371,7 @@ def test_supports_clang_reassociate(self):
setup(
name = "cmfrec",
packages = ["cmfrec"],
version = '3.5.1-10',
version = '3.5.1-11',
description = 'Collective matrix factorization',
author = 'David Cortes',
url = 'https://github.com/david-cortes/cmfrec',
Expand Down

0 comments on commit 526d86f

Please sign in to comment.