2

Unfortunately I found no examples for this topic. I want to deploy my own application written by python and I using PySide (LGPL-licensed) for GUI surface. How can I link libraries dynamically? (in this case the application has not be opensource). Does the .exe binary code generated by pyinstaller or py2exe also dynamically binded?

Thanks a lot! Best regards

ekhumoro
  • 115,249
  • 20
  • 229
  • 336
Python_nub
  • 21
  • 2
  • or how to write python code to make it possible to relink the application with a different version of the LGPL source code? – Python_nub Oct 13 '17 at 11:50
  • Typically, these scripts bundle the libraries in a place next to the executable so that it links easily (without the system libraries getting linked by accident). Do you have any samples or examples you've tried? – sid16rgt Oct 19 '17 at 16:01
  • What libraries do you want to link? – noEmbryo Mar 02 '23 at 20:58

2 Answers2

1

Unfortunately, pyinstaller copies the pyside script into the EXE itself, basically statically linking it.

You can exclude python modules from automatically being copied by pyinstaller with --exclude-module, but of course then your app will crash at startup.

The next step is to somehow bundle the pyside files to a folder next to your EXE.

This blog post has a great walkthrough of how to configure the python module resolution process to find the files.

Carl Walsh
  • 6,100
  • 2
  • 46
  • 50
0

You don't have to link any libraries because of PySide...

The GNU Lesser General Public License (LGPL) is another free-software license published by the Free Software Foundation (FSF). This license is modeled on the GPL but allows developers to use software components released under the LGPL in their own software, without being required to release their source code.

The LGPL license does not require you to share the source code of your own applications, even if they are bundled with PySide2.

The LGPL does require you to distribute any changes you make to the PySide source code itself, but unless you're doing something very weird, you won't do this when making Python GUIs.

noEmbryo
  • 2,176
  • 2
  • 10
  • 15