Skip to content

Commit 2ac0a79

Browse files
committed
Work around naming of static libs.
1 parent de9bb32 commit 2ac0a79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setuptools/_distutils/file_util.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ def copy_file( # noqa: C901
104104
from distutils._modified import newer
105105
from stat import S_IMODE, ST_ATIME, ST_MODE, ST_MTIME
106106

107+
if not os.path.isfile(src):
108+
src = os.path.join(os.path.dirname(src), "lib" + os.path.basename(src))
109+
if not os.path.isfile(src):
110+
src = os.path.join(os.path.dirname(src), os.path.basename(src) + ".a")
107111
if not os.path.isfile(src):
108112
raise DistutilsFileError(
109113
f"can't copy '{src}': doesn't exist or not a regular file"

0 commit comments

Comments
 (0)