From dbb2914ca5a630fbfc2fc1000aa9ff8bdef3298f Mon Sep 17 00:00:00 2001 From: Julian Smith Date: Thu, 17 Oct 2024 14:14:09 +0100 Subject: [PATCH] pipcl.py:build_extension(): fix handling of on windows. --- pipcl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pipcl.py b/pipcl.py index 0620c4bbe..fbe81f5ab 100644 --- a/pipcl.py +++ b/pipcl.py @@ -1439,7 +1439,8 @@ def build_extension( A string, or a sequence of library paths to be prefixed with `/LIBPATH:` on Windows or `-L` on Unix. libs - A string, or a sequence of library names to be prefixed with `-l`. + A string, or a sequence of library names. Each item is prefixed + with `-l` on non-Windows. optimise: Whether to use compiler optimisations. debug: @@ -1502,7 +1503,7 @@ def build_extension( includes_text = _flags( includes, '-I') defines_text = _flags( defines, '-D') libpaths_text = _flags( libpaths, '/LIBPATH:', '"') if windows() else _flags( libpaths, '-L') - libs_text = _flags( libs, '-l') + libs_text = _flags( libs, '' if windows() else '-l') path_cpp = f'{builddir}/{os.path.basename(path_i)}' path_cpp += '.cpp' if cpp else '.c' os.makedirs( outdir, exist_ok=True)