1
0

README.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. This example shows how to package a program that uses the PyGI-bindings of Gtk (or PyGObject). Python 3.4.3 64-bit will be used together with 64-bit dependencies.
  2. The example program conists of a window with a matplotlib-plot and a button that triggers the window to close.
  3. Requirements
  4. ------------
  5. This example needs 7zip in order to work. You can install it for example on
  6. Debian-style distributions using:
  7. ::
  8. sudo apt-get install p7zip
  9. Building the program
  10. --------------------
  11. A shell script can be used to download some of the dependencies:
  12. ::
  13. sh 1_download.sh
  14. The numpy 64-bit wheel can be downloaded here (numpy‑1.9.2+mkl‑cp34‑none‑win_amd64.whl):
  15. http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
  16. Rename it to numpy.whl before starting the second script.
  17. The next script will copy all the dependencies into the ``pynsist_pkgs`` folder.
  18. ::
  19. sh 2_extract.sh
  20. After that, the example can be built using this command:
  21. ::
  22. python3 -m nsist installer.cfg
  23. Installer.cfg
  24. -------------
  25. The example uses 64-bit Python 3.4 and 64-bit dependencies. This is expressed in the
  26. ``installer.cfg``-file like this:
  27. ::
  28. version=3.4.3
  29. bitness=64
  30. The include section requires the Python packages numpy, matplotlib (which are taken from the ``pynsist_pkgs`` folder). In addition the packages six, dateutil and pyparsing are required. From the pygi-bindings the top level packages cairo, dbus, gi, gnome and pygtkcompat have to be listed here (They are also in the top level of the ``pynsist_pkgs`` directory). The ``gnome``-folder contains the dependencies ATK, Base, GDK, GDKPixbuf, GTK, JPEG, Pango, WebP and TIFF.
  31. ::
  32. [Include]
  33. packages=gi
  34. cairo
  35. dbus
  36. gnome
  37. pygtkcompat
  38. numpy
  39. matplotlib
  40. six
  41. dateutil
  42. pyparsing