comparison makefile @ 1856:55e41b61b472

python 3 upgrade starts: makefile and requirements pull py3 pkgs (with some pkg updates) Ignore-this: 29661f1a805befbd53ac306f241004dc
author drewp@bigasterisk.com
date Tue, 21 May 2019 23:37:26 +0000
parents 66a55cb17cbf
children 3f1b9b9b0505
comparison
equal deleted inserted replaced
1855:a2407582cef0 1856:55e41b61b472
1 ### setup ### 1 ### setup ###
2 2
3 packages: 3 packages:
4 sudo aptitude install coffeescript normalize-audio audacity python-pygame libffi-dev tix libzmq3-dev python-dev libssl-dev python-opencv python-cairo npm git python-virtualenv nginx-full python-tk 4 sudo aptitude install coffeescript normalize-audio audacity python3-pygame libffi-dev tix libzmq3-dev python3-dev libssl-dev python3-opencv python3-cairo npm git python3-virtualenv nginx-full python3-tk
5 5
6 gst_packages: 6 gst_packages:
7 sudo aptitude install python-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio python-gst-1.0 python-pygoocanvas gir1.2-goocanvas-2.0 7 sudo aptitude install python3-gi gir1.2-gst-plugins-base-1.0 libgirepository-1.0-1 gir1.2-gstreamer-1.0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-pulseaudio python3-gst-1.0 gir1.2-goocanvas-2.0
8 8
9 PYTHON=/usr/bin/pypy 9 PYTHON=/usr/bin/python3
10 PYTHON=/usr/bin/python
11 10
12 create_virtualenv: 11 create_virtualenv:
13 mkdir -p env 12 mkdir -p env
14 virtualenv -p $(PYTHON) env 13 virtualenv -p $(PYTHON) env
15 env/bin/pip install -U pip 14 env/bin/pip install -U pip
16 ln -sf ../env/bin/python bin/python 15 ln -sf ../env/bin/python bin/python
17 16
18 17 install_python_deps:
19 install_python_deps: link_to_sys_packages 18 env/bin/pip install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -U -r requirements.txt
20 env/bin/pip install twisted
21 env/bin/pip install -U -r requirements.txt
22
23 DP=/usr/lib/python2.7/dist-packages
24 SP=env/lib/python2.7/site-packages
25
26 link_to_sys_packages:
27 # http://stackoverflow.com/questions/249283/virtualenv-on-ubuntu-with-no-site-packages
28 ln -sf $(DP)/glib $(SP)/
29 ln -sf $(DP)/gi $(SP)/
30 ln -sf $(DP)/gobject $(SP)/
31 ln -sf $(DP)/cairo $(SP)/
32 ln -sf $(DP)/gtk-2.0 $(SP)/
33 ln -sf $(DP)/pygtk.py $(SP)/
34 ln -sf $(DP)/pygtk.pth $(SP)/
35 ln -sf $(DP)/pygst.pth $(SP)/
36 ln -sf $(DP)/pygst.py $(SP)/
37 ln -sf $(DP)/gst-0.10 $(SP)/
38 ln -sf $(DP)/goocanvasmodule.so $(SP)/
39 ln -sf $(DP)/cv2.x86_64-linux-gnu.so $(SP)/
40 ln -sf $(DP)/cv.py $(SP)/
41 19
42 binexec: 20 binexec:
43 chmod a+x bin/* 21 chmod a+x bin/*
44 22
45 23
65 # then apply tkdnd-patch-on-r95 to that 43 # then apply tkdnd-patch-on-r95 to that
66 cd tkdnd/trunk 44 cd tkdnd/trunk
67 ./configure 45 ./configure
68 make 46 make
69 47
70 env-mypy/bin/mypy:
71 mkdir -p env-mypy
72 virtualenv -p /usr/bin/python3 env-mypy/
73 env-mypy/bin/pip install mypy==0.590 lxml==4.2.1
74
75 ### build ### 48 ### build ###
76 49
77 coffee: 50 coffee:
78 zsh -c 'cd light9/web; ../../node_modules/coffeescript/bin/coffee --map -cw {.,live,timeline,paint,effects}/*.coffee' 51 zsh -c 'cd light9/web; ../../node_modules/coffeescript/bin/coffee --map -cw {.,live,timeline,paint,effects}/*.coffee'
79 52
80 mypy-collector: env-mypy/bin/mypy 53 mypy-collector:
81 env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep bin/collector light9/collector/*.py 54 env/bin/mypy --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep bin/collector light9/collector/*.py
82 55
83 mypy-paint: env-mypy/bin/mypy 56 mypy-paint:
84 env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep light9/paint/*.py 57 env/bin/mypy --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep light9/paint/*.py
85 58
86 ### show ### 59 ### show ###
87 60
88 darcs_show_checkpoint: 61 darcs_show_checkpoint:
89 darcs add --quiet --recursive ${LIGHT9_SHOW} 62 darcs add --quiet --recursive ${LIGHT9_SHOW}
90 darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW} 63 darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW}
91 64
92 ### pi setup ### 65 ### pi setup ###
93 66
94 raspberry_pi_packages: 67 raspberry_pi_packages:
95 sudo apt-get install python-picamera python-dev python-twisted python-virtualenv 68 sudo apt-get install python3-picamera python3-dev python3-twisted python3-virtualenv
96 69
97 raspberry_pi_virtualenv: 70 raspberry_pi_virtualenv:
98 mkdir -p env_pi 71 mkdir -p env_pi
99 virtualenv --system-site-packages env_pi 72 virtualenv -p /usr/bin/python3 --system-site-packages env_pi
100 env_pi/bin/pip install cyclone 'coloredlogs==6.0' 73 env_pi/bin/pip install cyclone 'coloredlogs==6.0'
101 74
102 ### arduino build ### 75 ### arduino build ###
103 76
104 /usr/share/arduino/Arduino.mk: 77 /usr/share/arduino/Arduino.mk: