From 526d86f083a3ae4074459d7b4f37855122c1fcb7 Mon Sep 17 00:00:00 2001 From: david-cortes Date: Mon, 6 Jan 2025 20:56:32 +0100 Subject: [PATCH] use temp folder for compiler test files --- setup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index a7d3943..52197ed 100644 --- a/setup.py +++ b/setup.py @@ -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 @@ -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: @@ -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: @@ -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',