1 | ## MacOS binaries |
---|
2 | |
---|
3 | The MacOS binaries contain Python 3.7.3 (or 2.7.16) 64 bit with all the needed modules and the web2py in the specified version: |
---|
4 | you don't need anything else to run them on MacOS! After uncompressing the zip file, you just need to click on the web2py icon inside. |
---|
5 | |
---|
6 | They were produced on MacOS Sierra 10.12.6 + security update 2019.001. |
---|
7 | |
---|
8 | ## Full MacOS build recipe |
---|
9 | |
---|
10 | 1. grab and install the official Python program: we've got version 3.7.3 or 2.7.16 (64 bit). If you've chosen python 2, change pip3 |
---|
11 | with pip, and python3 with python in the following instructions... |
---|
12 | |
---|
13 | 2. Open a terminal, update tools with: |
---|
14 | |
---|
15 | "python3 -m pip install --upgrade pip" |
---|
16 | "pip3 install --upgrade setuptools" |
---|
17 | |
---|
18 | |
---|
19 | 3. install PyInstaller with: |
---|
20 | sudo -H pip3 install pyinstaller (we've got PyInstaller-3.4 ) |
---|
21 | |
---|
22 | 4. additional (but not required) packages: |
---|
23 | (only for python 2: install Homebrew from https://brew.sh/#install , then 'brew install unixodbc' ) |
---|
24 | pip3 install psycopg2-binary = psycopg2-2.7.7 |
---|
25 | pip3 install pyodbc = pyodbc-4.0.26-cp37-cp37m |
---|
26 | pip3 install python-ldap (on the windows message, accept to install the "Command line developer tools"). Rerun: |
---|
27 | pip3 install python-ldap |
---|
28 | |
---|
29 | 5. grab latest web2py source from https://mdipierro.pythonanywhere.com/examples/static/web2py_src.zip |
---|
30 | (you need at least 2.18.3 for needed changes in gluon\admin.py). Open it to uncompress, in this example on Desktop/web2py |
---|
31 | |
---|
32 | |
---|
33 | 6. take the file build_web2py.py and web2py.mac.spec from this folder and place it on the Desktop/web2py folder |
---|
34 | |
---|
35 | 7. edit the file /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyInstaller/hooks/hook-_tkinter.py |
---|
36 | and change one of its line according to https://github.com/pyinstaller/pyinstaller/pull/3830 |
---|
37 | |
---|
38 | 8. (optional, for having a full working interactive shell) change the fake site.py module included within the PyInstaller installation |
---|
39 | with the content of the files web2py.site_37.py or web2py.site_27.py from this folder - see comments inside these files for details |
---|
40 | |
---|
41 | 9. open a terminal, goto Desktop/web2py and run: |
---|
42 | |
---|
43 | python3 build_web2py.py |
---|
44 | |
---|
45 | 10. if everything is fine, you'll obtain web2py_macos.zip on the Desktop/web2py folder. Inside it, there is the web2py program with |
---|
46 | both the CMD version and the APP version. |
---|
47 | |
---|
48 | ## Gothca |
---|
49 | |
---|
50 | Unfortunately, the APP version is still not working - see https://github.com/pyinstaller/pyinstaller/issues/3820 . |
---|