Commit 1dab27d5 authored by Maciej Lenartowicz's avatar Maciej Lenartowicz

Fixed Python version in Makefile.

parent 238d7bac
Pipeline #59654 passed with stage
in 24 minutes and 22 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,18 +47,18 @@ 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:
$(ROUTER_PYTHON) -m pip install -e .
$(PYTHON) -m pip install -e .
ln -sf /tmp/reforis-openvpn/reforis_static/reforis_openvpn /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
......@@ -71,14 +71,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_openvpn
$(VENV_BIN)/$(DEV_PYTHON) -m pycodestyle --config=pycodestyle reforis_openvpn
$(VENV_BIN)/$(PYTHON) -m pylint --rcfile=pylintrc reforis_openvpn
$(VENV_BIN)/$(PYTHON) -m pycodestyle --config=pycodestyle reforis_openvpn
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
......@@ -94,4 +94,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_openvpn/js/app.min.js
$(ROUTER_PYTHON) -m pip uninstall -y reforis_openvpn
$(PYTHON) -m pip uninstall -y reforis_openvpn
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