-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD_HOWTO_LINUX
63 lines (37 loc) · 2.07 KB
/
BUILD_HOWTO_LINUX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
This howto explains how to build 'jpwrappa' as an linux executable so that python is no longer a dependency.
This was done because there was an incompatibility between 'jpwrappa' and python version below 2.7.
## INSTRUCTIONS (APPLIES TO PYINSTALLER 2)
1. Download 'pyinstaller' from:
http://www.pyinstaller.org/
2. Unpack it:
tar -xjf pyinstaller-2.0.tar.bz2
3. compile (in below example result as one single file):
python pyinstaller.py --onefile ./jpwrappa/jpwrappa.py
4. look in the directory '/dist/'.
Voila!
## INSTRUCTIONS (APPLIES TO PYINSTALLER 1.5)
With PyInstaller 1.5 (which I think is the version that is still used on the Amazon Webcloud setup)
you first need to make a .spec file, so the compilation involves two steps:
python Makespec.py --onefile ./jpwrappa/jpwrappa.py
python pyinstaller.py jpwrappa.spec
## NOTE ON JPWRAPPA MAKEFILE
The current version of the makefile uses the following commands:
pymakespec --onefile j./jpwrappa/pwrappa.py
pyinstaller jpwrappa.spec
Apparently pymakespec/pyinstaller are helper scripts that call Makespec.py and pyinstaller.py, respectively.
This works on the Amazon Webcloud setup, but for local builds you will need to change these lines
so that the actual Python scripts are called. To make things slightly more complicated PyInstaller
has no default installation location, so you'll have to insert the file paths that apply to you
system, e.g.:
python /home/johan/pyinstall/Makespec.py --onefile ./jpwrappa/jpwrappa.py
python /home/johan/pyinstall/pyinstaller.py jpwrappa.spec
## BUILDING THE DEBIAN PACKAGES LOCALLY
You can build jpwrappa locally using:
dpkg-buildpackage -tc
However this will result in an error because of a missing changelog file. Apparently it is generated
automatically on the Amazon Webcloud setup, but I'm not exactly sure how! For testing purposes you may
use a dummy changelog as a workaround.
In addition you will need to edit the makefile as described in the previous section.
More info on all this here:
http://www.openplanetsfoundation.org/blogs/2013-04-23-adventures-debian-packaging
Updated 3/5/2013 by JvdK