简体   繁体   中英

Releasing pygtk application

I have developed a pygtk application and i need to release it to customers. I am using python 2.7, pygtk 2.2 in ubuntu.

My question is how can I bundle the required packages(python, pygtk, gobject) together with my application, so that even if these packages are not installed in client machine I can run my application.

I tried with pyinstaller but, the executable depends on the glibc ie executable created with higher glibc version will not work with the machine which has lower glibc version.

So is there any way to create a release directory which includes all the packages required so that I can run my application in any system without installing the packages.

Thanks in advance,

Just adding the solution to my own question!

As suggested in the comments above installed packages by downloading the source and compiled them in a machine which had glibc2.5 then created binary executable of my pygtk app using pyinstaller

I had tried compiling packages earlier also, but weren't checking the ./configure output properly. The problem was, I was trying to install gtk and pygtk without installing cairo and pango. So pygtk skipped building gtk packages because it did not find any cairo package. This was mentioned in the ./ configure script but I had not checked that.

Summarizing:

To configure pygtk to python need to folow these steps

  1. install sqlite-devel #If sqlite needed
  2. install python(2.7)
  3. install gtk(2.24.0) -> requires glib(2.27.3), atk(1.29.2), cairo(1.8.10), pango(1.22.4), gdk-pixbuf(2.21.3)
  4. install pygtk(2.24.0) -> requires pygobject-2.28.3, pycairo(1.8.10)

All the above packages must be compiled to the same prefix, and need to set the PYTHON and PATHONPATH environment variables. The versions of packages also play major role. Added version in parenthesis that worked for me.

There are many dependencies while installing some of the packages so I had to install following packages using yum: libxext, librender, gettext, zlib, libgtk2-devel

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM