Commit 284ab2b4 authored by Maciej Lenartowicz's avatar Maciej Lenartowicz

Fixed Python version in Makefile.

parent 4aacf809
Pipeline #59655 passed with stage
in 21 minutes and 54 seconds
......@@ -5,11 +5,11 @@
.PHONY: all venv prepare-dev install install-js install-local-reforis watch-js build-js lint lint-js lint-js-fix lint-web test test-js test-web test-js-update-snapshots create-messages update-messages compile-messages clean
DEV_PYTHON=python3.7
ROUTER_PYTHON=python3.6
VENV_NAME?=venv
VENV_BIN=$(shell pwd)/$(VENV_NAME)/bin
PYTHON=python3
JS_DIR=./js
all:
......@@ -36,10 +36,10 @@ all:
venv: $(VENV_NAME)/bin/activate
$(VENV_NAME)/bin/activate: setup.py
test -d $(VENV_NAME) || $(DEV_PYTHON) -m virtualenv -p $(DEV_PYTHON) $(VENV_NAME)
test -d $(VENV_NAME) || $(PYTHON) -m virtualenv -p $(PYTHON) $(VENV_NAME)
# Some problem in latest version of setuptools during extracting translations.
$(VENV_BIN)/$(DEV_PYTHON) -m pip install -U pip setuptools==39.1.0
$(VENV_BIN)/$(DEV_PYTHON) -m pip install -e .[devel]
$(VENV_BIN)/$(PYTHON) -m pip install -U pip setuptools==39.1.0
$(VENV_BIN)/$(PYTHON) -m pip install -e .[devel]
touch $(VENV_NAME)/bin/activate
prepare-dev:
......@@ -47,19 +47,19 @@ prepare-dev:
which npm || sudo apt install -y nodejs
cd $(JS_DIR); npm install
which $(DEV_PYTHON) || sudo apt install -y $(DEV_PYTHON) $(DEV_PYTHON)-pip
which virtualenv || sudo $(DEV_PYTHON) -m pip install virtualenv
which $(PYTHON) || sudo apt install -y $(PYTHON) $(PYTHON)-pip
which virtualenv || sudo $(PYTHON) -m pip install virtualenv
make venv
install:
opkg update
$(ROUTER_PYTHON) -m pip install -e .
$(PYTHON) -m pip install -e .
ln -sf /tmp/reforis-diagnostics/reforis_static/reforis_diagnostics /tmp/reforis/reforis_static/
/etc/init.d/lighttpd restart
install-js: js/package.json
cd $(JS_DIR); npm install --save-dev
install-local-reforis:
$(VENV_BIN)/$(DEV_PYTHON) -m pip install -e ../reforis
$(VENV_BIN)/$(PYTHON) -m pip install -e ../reforis
watch-js:
cd $(JS_DIR); npm run-script watch
......@@ -72,14 +72,14 @@ lint-js:
lint-js-fix:
cd $(JS_DIR); npm run lint:fix
lint-web: venv
$(VENV_BIN)/$(DEV_PYTHON) -m pylint --rcfile=pylintrc reforis_diagnostics
$(VENV_BIN)/$(DEV_PYTHON) -m pycodestyle --config=pycodestyle reforis_diagnostics
$(VENV_BIN)/$(PYTHON) -m pylint --rcfile=pylintrc reforis_diagnostics
$(VENV_BIN)/$(PYTHON) -m pycodestyle --config=pycodestyle reforis_diagnostics
test: test-js test-web
test-js:
cd $(JS_DIR); npm test
test-web: venv
$(VENV_BIN)/$(DEV_PYTHON) -m pytest -vv tests
$(VENV_BIN)/$(PYTHON) -m pytest -vv tests
test-js-update-snapshots:
cd $(JS_DIR); npm test -- -u
......@@ -95,4 +95,4 @@ clean:
rm -rf $(VENV_NAME) *.eggs *.egg-info dist build .cache
rm -rf dist build *.egg-info
rm -rf $(JS_DIR)/node_modules/ reforis_static/reforis_diagnostics/js/app.min.js
$(ROUTER_PYTHON) -m pip uninstall -y reforis_diagnostics
$(PYTHON) -m pip uninstall -y reforis_diagnostics
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment