pyqtdeploy.PythonPackage deeper than one dir

Phil Thompson phil at riverbankcomputing.com
Sun Oct 20 13:01:52 BST 2024


On 19/10/2024 18:11, Kaiser Chief wrote:
> Hi Phil,
> 
> Thank you for the clarification.
> 
> I realise that I am only in the early stages of understanding the inner
> workings of python packages and how to put them into an app (through 
> frozen
> packages for instance).
> 
> I am keen to progress on this on my own for now and contribute to
> pyqtdeploy if I find something useful.
> 
> At the moment to install a specific python package into the app, I have
> built a very simple tool that will search for dependencies related to 
> the
> package and it will update the sysroot (and pdt) with them.
> 
> The tool works well for packages with standard library dependencies 
> (like
> pyyaml), but I struggle a bit more with numpy package or pandas package
> because of some built-in packages that I cannot freeze easily or
> multi-package dependencies.
> 
> I am only focusing on integrating python packages for now.
> 
> As such, I was wondering whether there was a simpler way to integrate
> python packages into an app.
> 
> If not that's fine, I will keep researching and experimenting.
> 
> Best regards,
> 
> KC

The simplest way is to use the wheel plugin...

https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/sysroot.html#defining-a-component-using-the-sysroot-specification-file

You could do an entirely bespoke component plugin based on copy_dir()...

https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/sysroot.html#pyqtdeploy.Component.copy_dir

That's not to say it couldn't be made simpler - suggestions welcome.

Regarding your tool, I could see it being very useful if it generated a 
prototype wheel plugin which could then be manually refined (if 
necessary).

Phil


More information about the PyQt mailing list