pyqtdeploy: "." inserted in DataFile paths under first project subdirs

Patrick Stinson patrickkidd at gmail.com
Thu Oct 20 20:22:39 BST 2022


Example project here: https://github.com/patrickkidd/pyqtdeploy-demo



On Thu, Oct 20, 2022 at 11:18 AM Patrick Stinson <patrickkidd at gmail.com>
wrote:

> It looks like pyqtdeploy-build can't handle resource files added to
> subdirs under the app package folder. The path separator "/" is replaced
> with a dot "." for all subdirs in QrcPackage._add_part(). I believe this
> bug has been there for some time now.
>
> For example, if my app package is ./demo and I have resource files under
> ./demo/resources/delete-button.png, then pyqtdeploy-build throws the
> following exception:
>
>   File
> "/Users/patrick/dev/pyqtdeploy-demo/site-packages/pyqtdeploy/pyqtdeploybuild_main.py",
> line 82, in main
>     builder.build(args.opt, args.resources, args.clean, args.build_dir)
>   File
> "/Users/patrick/dev/pyqtdeploy-demo/site-packages/pyqtdeploy/builder/builder.py",
> line 168, in build
>     resource_names = self._generate_resources(parts, job_writer,
>   File
> "/Users/patrick/dev/pyqtdeploy-demo/site-packages/pyqtdeploy/builder/builder.py",
> line 339, in _generate_resources
>     self._write_python_modules(project.application_package.parts,
>   File
> "/Users/patrick/dev/pyqtdeploy-demo/site-packages/pyqtdeploy/builder/builder.py",
> line 618, in _write_python_modules
>     self._write_python_module(name, part, parts, part_root_dir,
>   File
> "/Users/patrick/dev/pyqtdeploy-demo/site-packages/pyqtdeploy/builder/builder.py",
> line 609, in _write_python_module
>     shutil.copy2(src_path, dst_path)
>   File "/Users/patrick/.pyenv/versions/3.10.6/lib/python3.10/shutil.py",
> line 434, in copy2
>     copyfile(src, dst, follow_symlinks=follow_symlinks)
>   File "/Users/patrick/.pyenv/versions/3.10.6/lib/python3.10/shutil.py",
> line 254, in copyfile
>     with open(src, 'rb') as fsrc:
> FileNotFoundError: [Errno 2] No such file or directory:
> '/Users/patrick/dev/pyqtdeploy-demo/demo.resources/delete-button.png'
>
> Cheers,
> -Patrick
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20221020/d04e83e7/attachment.htm>


More information about the PyQt mailing list