-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathINSTALL.txt
64 lines (46 loc) · 2.06 KB
/
INSTALL.txt
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
64
Running & packaging pyBoxshade
These instructions are only for those wanting to build from source. For most users,
it is best to download the pre-built binary for your system.
Required:
The pyBoxshade source files and the images folder (this contains various icons used by
the program)
python 3.x (developed against 3.8)
In your python installation, you need:
PyQt5 (I used 5.14.2 for the Sierra version and 5.15.2 for everything else)
numpy (I used 1.19.5)
biopython (I used 1.78)
These can be installed using pip,i.e
pip install numpy, biopython, pyqt5
To package the application, I used pyinstaller
pip install pyinstaller
NB Because of a problem between pyinstaller and setuptools (at least in my experience
in the first half of 2020), you need to avoid setuptools >= 45.0.0, so after installing
pyinstaller, do the following:
pip install --upgrade 'setuptools<45.0.0'
A) Running from the command line:
To run the application from python, ensure you are in the folder with the source code or
have that folder in your PYTHONPATH, then:
python BS_app.py
(you may have to type python3 BS_app.py on a Mac depending on how python was installed)
B) Packaging as an application:
In the folder containing the source and the images folder, type one of the following:
on Mac OSX:
pyi-makespec -n pyBoxshade -w BS_app.py
on Windows/Linux:
pyi-makespec -n pyBoxshade -w --onefile BS_app.py
This creates a file pyBoxshade.spec. Edit this file as follows:
replace the line
datas=[],
with
datas=[('images', 'images')],
and (for Mac OS and Windows only) replace the line
excludes=[],
with
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
Save this file and then type
pyinstaller pyBoxshade.spec
On Mac OSX this will create a stand-alone Mac application folder called pyBoxshade.app,
which will launch as a normal application.
On Windows and Linux this creates a stand-alone application pyBoxshade (.exe on Windows),
which behaves as a normal application except that it is a little slow to startup (it has
to unpack the python environment to a temporary folder and run from there).