Skip to content

Commit afb4080

Browse files
Tentative Cygwin support for dll
Quick hack to support Cygwin-based dll.
1 parent f10f4d7 commit afb4080

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setuptools_rust/build.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def build_extension(self, ext):
216216
"rust build failed; unable to find executable in %s" % target_dir
217217
)
218218
else:
219-
if sys.platform == "win32":
219+
if sys.platform == "win32" or sys.platform == "cygwin":
220220
dylib_ext = "dll"
221221
elif sys.platform == "darwin":
222222
dylib_ext = "dylib"
@@ -282,7 +282,7 @@ def build_extension(self, ext):
282282
except subprocess.CalledProcessError as e:
283283
pass
284284

285-
if executable:
285+
if executable or sys.platform == "win32" or sys.platform == "cygwin":
286286
mode = os.stat(ext_path).st_mode
287287
mode |= (mode & 0o444) >> 2 # copy R bits to X
288288
os.chmod(ext_path, mode)

0 commit comments

Comments
 (0)