# HG changeset patch # User Drew Perttula # Date 2018-04-26 06:37:21 # Node ID 03125dac50a2c52c4b35816151ffde00a3fad915 # Parent 0f1b6f48ae1eebaff5e8d5cc9a28579ebdb872ac reorder makefile Ignore-this: ea04b284790a85e8674b3c5b6952f736 diff --git a/makefile b/makefile --- a/makefile +++ b/makefile @@ -1,30 +1,20 @@ -NOSEARGS="--no-path-adjustment light9.rdfdb.rdflibpatch light9.rdfdb.patch light9.effecteval.test_effect light9.collector light9.rdfdb.graphfile_test light9.paint light9.effect" - -tests: - eval env/bin/nosetests -x $(NOSEARGS) +### setup ### -tests_watch: - eval env/bin/nosetests --with-watcher $(NOSEARGS) +packages: + 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 python-tk - -tests_coverage: - eval env/bin/nosetests --with-coverage --cover-erase --cover-html --cover-html-dir=/tmp/light9-cov/ --cover-package=light9 --cover-branches $(NOSEARGS) +gst_packages: + 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 -test_js_init: - npm install - -test_js: - coffee -c light9/web/*.coffee - node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee +PYTHON=/usr/bin/pypy +PYTHON=/usr/bin/python -test_js_watch: - # have coffee continuously running - watch -c node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee --colors +create_virtualenv: + mkdir -p env + virtualenv -p $(PYTHON) env + env/bin/pip install -U pip + ln -sf ../env/bin/python bin/python -# needed packages: python-gtk2 python-imaging - -binexec: - chmod a+x bin/* install_python_deps: link_to_sys_packages env/bin/pip install twisted @@ -49,29 +39,8 @@ link_to_sys_packages: ln -sf $(DP)/cv2.x86_64-linux-gnu.so $(SP)/ ln -sf $(DP)/cv.py $(SP)/ -PYTHON=/usr/bin/pypy -PYTHON=/usr/bin/python - -create_virtualenv: - mkdir -p env - virtualenv -p $(PYTHON) env - env/bin/pip install -U pip - ln -sf ../env/bin/python bin/python - -tkdnd_build: - # get tkdnd r95 with subversion - # then apply tkdnd-patch-on-r95 to that - cd tkdnd/trunk - ./configure - make - -bin/ascoltami2: gst_packages link_to_sys_packages - -gst_packages: - 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 - -packages: - 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 python-tk +binexec: + chmod a+x bin/* node_modules/bower/bin/bower: @@ -85,6 +54,41 @@ bower: node_modules/bower/bin/bower bin/ cd light9/web/lib/N3.js; npm install; PATH=../../../../bin:$(PATH) npm run browser cd light9/web/lib/d3; PATH=../../../../bin:$(PATH) npm install +bin/ascoltami2: gst_packages link_to_sys_packages + +effect_node_setup: create_virtualenv packages binexec install_python_deps + +tkdnd_build: + # get tkdnd r95 with subversion + # then apply tkdnd-patch-on-r95 to that + cd tkdnd/trunk + ./configure + make + +env-mypy/bin/mypy: + mkdir -p env-mypy + virtualenv -p /usr/bin/python3 env-mypy/ + env-mypy/bin/pip install mypy==0.510 lxml==3.7.3 + +### build ### + +coffee: + zsh -c 'coffee -cw light9/web/{.,live,timeline,paint,effects}/*.coffee' + +mypy-collector: env-mypy/bin/mypy + env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep bin/collector light9/collector/*.py + +mypy-paint: env-mypy/bin/mypy + env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep light9/paint/*.py + +### show ### + +darcs_show_checkpoint: + darcs add --quiet --recursive ${LIGHT9_SHOW} + darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW} + +### pi setup ### + raspberry_pi_packages: sudo apt-get install python-picamera python-dev python-twisted python-virtualenv @@ -93,9 +97,7 @@ raspberry_pi_virtualenv: virtualenv --system-site-packages env_pi env_pi/bin/pip install cyclone 'coloredlogs==6.0' -darcs_show_checkpoint: - darcs add --quiet --recursive ${LIGHT9_SHOW} - darcs rec -a -m "checkpoint show data" ${LIGHT9_SHOW} +### arduino build ### /usr/share/arduino/Arduino.mk: sudo aptitude install arduino-mk @@ -104,18 +106,27 @@ arduino_upload: /usr/share/arduino/Ardui cd rgbled make upload -effect_node_setup: create_virtualenv packages binexec install_python_deps +### testing ### + +NOSEARGS="--no-path-adjustment light9.rdfdb.rdflibpatch light9.rdfdb.patch light9.effecteval.test_effect light9.collector light9.rdfdb.graphfile_test light9.paint light9.effect" -coffee: - zsh -c 'coffee -cw light9/web/{.,live,timeline,paint,effects}/*.coffee' +tests: + eval env/bin/nosetests -x $(NOSEARGS) + +tests_watch: + eval env/bin/nosetests --with-watcher $(NOSEARGS) + -env-mypy/bin/mypy: - mkdir -p env-mypy - virtualenv -p /usr/bin/python3 env-mypy/ - env-mypy/bin/pip install mypy==0.510 lxml==3.7.3 +tests_coverage: + eval env/bin/nosetests --with-coverage --cover-erase --cover-html --cover-html-dir=/tmp/light9-cov/ --cover-package=light9 --cover-branches $(NOSEARGS) + +test_js_init: + npm install -mypy-collector: env-mypy/bin/mypy - env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep bin/collector light9/collector/*.py +test_js: + coffee -c light9/web/*.coffee + node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee -mypy-paint: env-mypy/bin/mypy - env-mypy/bin/mypy --py2 --ignore-missing-imports --strict-optional --custom-typeshed-dir stubs --html-report /tmp/rep light9/paint/*.py +test_js_watch: + # have coffee continuously running + watch -c node_modules/mocha/bin/mocha --compilers coffee:coffee-script/register --globals window,N3 light9/web/graph_test.coffee --colors