22
33.DEFAULT_GOAL := help
44
5- FIREFOX_VERSION := "94.0.1 "
5+ FIREFOX_VERSION := "67.0 "
66FIREFOX_LINUX_ARCH := $(shell uname -m)
77
88help : # # display this help message
@@ -24,19 +24,43 @@ clean: ## remove generated byte code, coverage reports, and build artifacts
2424 rm -fr dist/
2525 rm -fr *.egg-info
2626
27+ # Define PIP_COMPILE_OPTS=-v to get more information during make upgrade.
28+ PIP_COMPILE = pip-compile --upgrade $(PIP_COMPILE_OPTS )
29+
30+ upgrade : export CUSTOM_COMPILE_COMMAND=make upgrade
31+ upgrade : # # update the requirements/*.txt files with the latest packages satisfying requirements/*.in
32+ pip install -qr requirements/pip-tools.txt
33+ # Make sure to compile files after any other files they include!
34+ $(PIP_COMPILE ) --allow-unsafe -o requirements/pip.txt requirements/pip.in
35+ $(PIP_COMPILE ) -o requirements/pip-tools.txt requirements/pip-tools.in
36+ pip install -qr requirements/pip.txt
37+ pip install -qr requirements/pip-tools.txt
38+ $(PIP_COMPILE ) -o requirements/base.txt requirements/base.in
39+ $(PIP_COMPILE ) -o requirements/ci.txt requirements/ci.in
40+ $(PIP_COMPILE ) -o requirements/dev.txt requirements/dev.in
41+
2742quality : # # check coding style with pycodestyle and pylint
2843 pycodestyle poll --max-line-length=120
2944 pylint poll
3045
3146node_requirements : # # Install requirements for handlebar templates i18n extraction
3247 npm install
3348
34- python_requirements : # # install development environment requirements
35- pip install -r requirements.txt --exists-action w
36- pip install -r requirements-dev.txt --exists-action w
49+ python_requirements : install_linux_dev_firefox # # install development environment requirements
50+ pip install wheel
51+ pip install -r requirements/base.txt --exists-action w
52+ pip install -r requirements/dev.txt --exists-action w
53+ ifeq ($(VIRTUAL_ENV ) ,)
3754 cd ./src/xblock-sdk && \
38- pip install -r requirements/base.txt && \
39- pip install -r requirements/test.txt
55+ pip install -r requirements/base.txt && \
56+ pip install -r requirements/test.txt
57+ else
58+ cd $(VIRTUAL_ENV)/src/xblock-sdk && \
59+ pip install -r requirements/base.txt && \
60+ pip install -r requirements/test.txt
61+ endif
62+ pip uninstall -y selenium
63+ pip install selenium==3.4.1
4064 pip install -e .
4165
4266requirements : node_requirements python_requirements # # install development environment requirements
@@ -52,15 +76,16 @@ install_linux_dev_firefox: ## Downloads custom version of firefox for Selenium i
5276 --output .firefox/firefox.tar.bz2
5377
5478 cd .firefox && tar -xvjf firefox.tar.bz2
55- cd .geckodriver && wget https://github.com/mozilla/geckodriver/releases/download/v0.15 .0/geckodriver-v0.15 .0-linux64.tar.gz
56- cd .geckodriver && tar -xzf geckodriver-v0.15 .0-linux64.tar.gz
79+ cd .geckodriver && wget https://github.com/mozilla/geckodriver/releases/download/v0.26 .0/geckodriver-v0.26 .0-linux64.tar.gz
80+ cd .geckodriver && tar -xzf geckodriver-v0.26 .0-linux64.tar.gz
5781
5882linux_dev_test : # # Run tests in development environment to use custom firefox
59- PATH=.firefox/firefox/:.geckodriver/:$(PATH ) make test
83+ mkdir -p var
84+ PATH=.firefox/firefox/:.geckodriver/:$(PATH ) xvfb-run python run_tests.py
6085
6186test : # # run tests in the current virtualenv
62- mkdir -p var # for var/workbench.log
63- python run_tests.py --with-coverage --cover-package=poll
87+ mkdir -p var
88+ DJANGO_SETTINGS_MODULE=workbench.settings pytest
6489
6590selfcheck : # # check that the Makefile is well-formed
6691 @echo " The Makefile is well-formed."
0 commit comments