You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I hope this is the correct place to discuss hatch-build-scripts. I was surprised when I landed here from its New Issue page.
I am trying to use hatch-build-scripts to compile Kaitai Struct format definitions into Python modules. In my case, the format definitions are in src/foo/formats, and I would like to have the resulting Python modules in the same folder.
python -m build --wheel generates the Python modules in src/foo/formats as expected, but fails to copy them, since they already are where they should be.
* Creating venv isolated environment...
* Installing packages in isolated environment... (black, hatch-build-scripts, hatchling)
* Getting build dependencies for wheel...
* Building wheel...
Building `wheel` version `standard`
parsing vsx_image_stack.ksy...
reading vsx_image_stack.ksy...
... compiling it for python...
.... writing vsx_image_stack.py
Traceback (most recent call last):
File "C:\venvs\foo\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "C:\venvs\foo\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\venvs\foo\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\peronian\AppData\Local\Temp\build-env-qz_7ncnl\Lib\site-packages\hatchling\build.py", line 58, in build_wheel
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\peronian\AppData\Local\Temp\build-env-qz_7ncnl\Lib\site-packages\hatchling\builders\plugin\interface.py", line 147, in build
build_hook.initialize(version, build_data)
File "C:\Users\peronian\AppData\Local\Temp\build-env-qz_7ncnl\Lib\site-packages\hatch_build_scripts\plugin.py", line 60, in initialize
shutil.copyfile(src_file, out_file)
File "C:\Users\peronian\AppData\Local\Programs\Python\Python312\Lib\shutil.py", line 240, in copyfile
raise SameFileError("{!r} and {!r} are the same file".format(src, dst))
shutil.SameFileError: WindowsPath('C:/Users/peronian/foo/src/foo/formats/vsx_image_stack.py') and WindowsPath('C:/Users/peronian/foo/src/foo/formats/vsx_image_stack.py') are the same file
ERROR Backend subprocess exited when trying to invoke build_wheel
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I hope this is the correct place to discuss hatch-build-scripts. I was surprised when I landed here from its New Issue page.
I am trying to use hatch-build-scripts to compile Kaitai Struct format definitions into Python modules. In my case, the format definitions are in
src/foo/formats, and I would like to have the resulting Python modules in the same folder.I tried the following in my
pyproject.toml:python -m build --wheelgenerates the Python modules insrc/foo/formatsas expected, but fails to copy them, since they already are where they should be.What am I missing?
All reactions