File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -500,6 +500,7 @@ def test_executable_symlinks(self):
500500
501501 # gh-124651: test quoted strings
502502 @unittest .skipIf (os .name == 'nt' , 'contains invalid characters on Windows' )
503+ @unittest .skipIf (sys .platform == 'cygwin' , 'fail to locate cygpython DLL' )
503504 def test_special_chars_bash (self ):
504505 """
505506 Test that the template strings are quoted properly (bash)
@@ -714,6 +715,12 @@ def test_zippath_from_non_installed_posix(self):
714715 os .mkdir (bindir )
715716 python_exe = os .path .basename (sys .executable )
716717 shutil .copy2 (sys .executable , os .path .join (bindir , python_exe ))
718+ if sys .platform == 'cygwin' :
719+ # Copy libpython DLL
720+ exe_path = os .path .dirname (sys .executable )
721+ libpython_dll = sysconfig .get_config_var ('DLLLIBRARY' )
722+ shutil .copy2 (os .path .join (exe_path , libpython_dll ),
723+ os .path .join (bindir , libpython_dll ))
717724 libdir = os .path .join (non_installed_dir , platlibdir , self .lib [1 ])
718725 os .makedirs (libdir )
719726 landmark = os .path .join (libdir , "os.py" )
Original file line number Diff line number Diff line change @@ -319,6 +319,14 @@ def setup_python(self, context):
319319 if not os .path .islink (path ):
320320 os .chmod (path , 0o755 )
321321
322+ if not self .symlinks and sys .platform == 'cygwin' :
323+ # Copy libpython DLL
324+ libpython_dll = sysconfig .get_config_var ('DLLLIBRARY' )
325+ if not os .path .exists (os .path .join (binpath , libpython_dll )):
326+ exe_path = os .path .dirname (sys .executable )
327+ shutil .copy (os .path .join (exe_path , libpython_dll ),
328+ os .path .join (binpath , libpython_dll ))
329+
322330 else :
323331 def setup_python (self , context ):
324332 """
You can’t perform that action at this time.
0 commit comments