New submission from Karthik Nishanth <karthik.nisha...@zivid.com>:

I am making a bdist_wheel for a private python binary module.

`python setup.py bdist_wheel` fails on a very specific windows VM repeatedly. 
This works fine on both a regular windows machine & linux machines.

Attached the complete distutils verbose logs.

Stacktrace for quick search:
---------------------------------------------

     File "C:\Program Files\Python39\lib\site-packages\setuptools\__init__.py", 
line 165, in setup
       return distutils.core.setup(**attrs)
     File "C:\Program Files\Python39\lib\distutils\core.py", line 148, in setup
       dist.run_commands()
     File "C:\Program Files\Python39\lib\distutils\dist.py", line 966, in 
run_commands
       self.run_command(cmd)
     File "C:\Program Files\Python39\lib\distutils\dist.py", line 985, in 
run_command
       cmd_obj.run()
     File "C:\Program Files\Python39\lib\site-packages\wheel\bdist_wheel.py", 
line 335, in run
       self.run_command('install')
     File "C:\Program Files\Python39\lib\distutils\cmd.py", line 313, in 
run_command
       self.distribution.run_command(command)
     File "C:\Program Files\Python39\lib\distutils\dist.py", line 985, in 
run_command
       cmd_obj.run()
     File "C:\Program 
Files\Python39\lib\site-packages\setuptools\command\install.py", line 61, in run
       return orig.install.run(self)
     File "C:\Program Files\Python39\lib\distutils\command\install.py", line 
558, in run
       self.run_command(cmd_name)
     File "C:\Program Files\Python39\lib\distutils\cmd.py", line 313, in 
run_command
       self.distribution.run_command(command)
     File "C:\Program Files\Python39\lib\distutils\dist.py", line 985, in 
run_command
       cmd_obj.run()
     File "C:\Program 
Files\Python39\lib\site-packages\setuptools\command\install_lib.py", line 12, 
in run
       outfiles = self.install()
     File "C:\Program Files\Python39\lib\distutils\command\install_lib.py", 
line 111, in install
       outfiles = self.copy_tree(self.build_dir, self.install_dir)
     File "C:\Program 
Files\Python39\lib\site-packages\setuptools\command\install_lib.py", line 95, 
in copy_tree
       return orig.install_lib.copy_tree(self, infile, outfile)
     File "C:\Program Files\Python39\lib\distutils\cmd.py", line 354, in 
copy_tree
       return dir_util.copy_tree(infile, outfile, preserve_mode,
     File "C:\Program Files\Python39\lib\distutils\dir_util.py", line 157, in 
copy_tree
       copy_tree(src_name, dst_name, preserve_mode,
     File "C:\Program Files\Python39\lib\distutils\dir_util.py", line 161, in 
copy_tree
       copy_file(src_name, dst_name, preserve_mode,
     File "C:\Program Files\Python39\lib\distutils\file_util.py", line 151, in 
copy_file
       _copy_file_contents(src, dst)
     File "C:\Program Files\Python39\lib\distutils\file_util.py", line 43, in 
_copy_file_contents
       raise DistutilsFileError(
   distutils.errors.DistutilsFileError: could not create 
'build\bdist.win-amd64\wheel\internal_pkgname-2.3.0_pre_alpha_1_c8273a4c_1_preview.data\purelib\mydeviceapi\mydeviceapi.cp39-win_amd64.pyd':
 No such file or directory

---------------------------------------------

I may get an [Errno 2] on open(dst, 'wb') if dst has a directory component that 
does not exist. But distutils logs already say 

> creating dir1
> creating dir1/dir2
> creating dir1/dir2/dir3

so I assume the directories must have been created before calling open().

----------
components: Distutils
files: scratch_4.txt
messages: 385758
nosy: dstufft, eric.araujo, knzivid
priority: normal
severity: normal
status: open
title: FileNotFoundError in distutils\file_util.py copy_tree
type: crash
versions: Python 3.9
Added file: https://bugs.python.org/file49767/scratch_4.txt

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43035>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to