[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: pyqtdeploy: "." inserted in DataFile paths under first project subdirs
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2022-10-30 16:55:09
Message-ID: 67cdf62e9b31b190ce34a999216a4736 () riverbankcomputing ! com
[Download RAW message or body]

On 20/10/2022 20:18, Patrick Stinson 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

Should be fixed in the next snapshot..

Thanks,
Phil
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic