From aec531912e8d0ed4e0d3fcd6cf325f87acdc894e Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Thu, 5 Dec 2019 16:43:50 +0000 Subject: use os.sep instead --- setup.py | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 7 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 9bc6e7d..8bfb8b2 100644 --- a/setup.py +++ b/setup.py @@ -120,13 +120,35 @@ def _skl_get_blas_info(): return False if on_cibw_win(): + blas_info = get_info("blas_opt", notfound_action=0) + print("***\nDetected blas info: %r" % blas_info) blas_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], "library_dirs": [ - "/c/cibw/openblas/OpenBLAS.0.2.14.1/lib/native/lib/" + os.sep.join( + [ + "C:", + "cibw", + "openblas", + "OpenBLAS.0.2.14.1", + "lib", + "native", + "lib", + ] + ) ], "include_dirs": [ - "/c/cibw/openblas/OpenBLAS.0.2.14.1/lib/native/include" + os.sep.join( + [ + "C:", + "cibw", + "openblas", + "OpenBLAS.0.2.14.1", + "lib", + "native", + "include", + ] + ) ], "language": "c", } @@ -162,16 +184,39 @@ def get_lapack_info(): return False if on_cibw_win(): + lapack_info = get_info("lapack_opt", notfound_action=0) + print("***\nDetected lapack info: %r" % lapack_info) lapack_info = { "define_macros": [("NO_ATLAS_INFO", 1), ("HAVE_CBLAS", None)], "library_dirs": [ - "/c/cibw/openblas/OpenBLAS.0.2.14.1/lib/native/lib/" + os.sep.join( + [ + "C:", + "cibw", + "openblas", + "OpenBLAS.0.2.14.1", + "lib", + "native", + "lib", + ] + ) ], "include_dirs": [ - "/c/cibw/openblas/OpenBLAS.0.2.14.1/lib/native/include" + os.sep.join( + [ + "C:", + "cibw", + "openblas", + "OpenBLAS.0.2.14.1", + "lib", + "native", + "include", + ] + ) ], "language": "c", } + print("***\nDefined lapack info: %r" % lapack_info) return ["openblas"], lapack_info lapack_info = get_info("lapack_opt", notfound_action=2) @@ -291,10 +336,10 @@ def cibuildwheel_windows(): print(os.environ.get("OPENBLAS", "none")) for path, dirs, files in os.walk("/c/cibw/openblas"): - print(path) + print(path, file=sys.stderr) for f in files: - print("\t" + f) - sys.stdout.flush() + print("\t" + f, file=sys.stderr) + sys.stderr.flush() import time time.sleep(5) -- cgit v1.2.3