From: Alexander M. <al...@ke...> - 2003-05-13 15:44:25
|
Hi, I have to freeze the software I wrote in order to get it running on a system which is not allowed to have a python (in fact any scripting language) installation. I use the python ldap module with the freeze.py utility in the Python tools distribution, but don't quite know what to do (in the building process) to the module to make it 'freezable'. Can anyboy please give me some advice on how to prepare the module correctly so it won't come up as a dependency in the freezing process, which in the end requires a full python installation on the target system? Thx in advance! Best regards Alex |
From: <mi...@st...> - 2003-05-13 19:12:44
|
Alexander Meisel wrote: > > I have to freeze the software I wrote in order to get it running on a > system which is not allowed to have a python (in fact any scripting language) > installation. I use the python ldap module with the freeze.py utility in the > Python tools distribution, but don't quite know what to do (in the building > process) to the module to make it 'freezable'. The following note in Python-2.2.2/Tools/freeze/README does not sound too good. --------------------------------- snip --------------------------------- A warning about shared library modules -------------------------------------- When your Python installation uses shared library modules such as _tkinter.pyd, these will not be incorporated in the frozen program. Again, the frozen program will work when you test it, but it won't work when you ship it to a site without a Python installation. --------------------------------- snip --------------------------------- I tried to freeze Demo/initialize.py but did not succeed. Ciao, Michael. |
From: <al...@ke...> - 2003-05-13 19:24:40
|
Hi Michael, I read that too ... I tried to copy the .so file to /usr/lib/python2.2/lib-dynload where are .so files for the built in modules are kept without success. I was wondering if there is a additional file which tells python (and freeze) that the .so file is actually there and can be used to freeze a script. The 2nd idea I'm going to try is to link the .so file to the binary (editing the Makefile produced by freeze). There must be a 'officall' way to freeze custom build libraries correctly. Best regards Alex On Tue, May 13, 2003 at 09:12:25PM +0200, Michael Ströder wrote: > Alexander Meisel wrote: > > > > I have to freeze the software I wrote in order to get it running on a > > system which is not allowed to have a python (in fact any scripting language) > > installation. I use the python ldap module with the freeze.py utility in the > > Python tools distribution, but don't quite know what to do (in the building > > process) to the module to make it 'freezable'. > > The following note in Python-2.2.2/Tools/freeze/README does not sound too good. > > --------------------------------- snip --------------------------------- > A warning about shared library modules > -------------------------------------- > > When your Python installation uses shared library modules such as > _tkinter.pyd, these will not be incorporated in the frozen program. > Again, the frozen program will work when you test it, but it won't > work when you ship it to a site without a Python installation. > --------------------------------- snip --------------------------------- > > I tried to freeze Demo/initialize.py but did not succeed. > > Ciao, Michael. > |
From: Alexander M. <pyt...@me...> - 2003-05-20 09:06:23
|
Hi, just an update how to do it. It is possible to freeze the python ldap library with your code. All you have to do is to archive the .o files into a file called _ldap.a and link them against the frozen binary. If you build py-ldap you find the .o files in /build/tmp..../*.o You need to build an archive (which basically combines them to one file) Linux: ar c _ldap.a /path/to/o/files/*.o Solaris: ar -q _ldap.a /path/to/o/files/*.o Then you use freeze.py as you normally would. After the make, you see the last giant gcc line which links everything to the binary. Copy and paste the line but add the _ldap.a file before the libpython2.2.a. You basically link the file again, but this time with the ldap library. Happy code freezing! Alexander Meisel On Tue, May 13, 2003 at 09:12:25PM +0200, Michael Ströder wrote: > Alexander Meisel wrote: > > > > I have to freeze the software I wrote in order to get it running on a > > system which is not allowed to have a python (in fact any scripting language) > > installation. I use the python ldap module with the freeze.py utility in the > > Python tools distribution, but don't quite know what to do (in the building > > process) to the module to make it 'freezable'. > > The following note in Python-2.2.2/Tools/freeze/README does not sound too good. > > --------------------------------- snip --------------------------------- > A warning about shared library modules > -------------------------------------- > > When your Python installation uses shared library modules such as > _tkinter.pyd, these will not be incorporated in the frozen program. > Again, the frozen program will work when you test it, but it won't > work when you ship it to a site without a Python installation. > --------------------------------- snip --------------------------------- > > I tried to freeze Demo/initialize.py but did not succeed. > > Ciao, Michael. > |