加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.63 KB
一键复制 编辑 原始数据 按行查看 历史
PYCODE = import flask.ext.statics as a; print a.__path__[0]
.PHONY: default isvirtualenv
default:
@echo "Local examples:"
@echo " make run # Starts a Flask development server locally."
@echo " make shell # Runs 'manage.py shell' locally with iPython."
@echo " make celery # Runs one development Celery worker with Beat."
@echo " make style # Check code styling with flake8."
@echo " make lint # Runs PyLint."
@echo " make test # Tests entire application with pytest."
isvirtualenv:
@if [ -z "$(VIRTUAL_ENV)" ]; then echo "ERROR: Not in a virtualenv." 1>&2; exit 1; fi
run:
(((i=0; while \[ $$i -lt 40 \]; do sleep 0.5; i=$$((i+1)); \
netstat -anp tcp |grep "\.5000.*LISTEN" &>/dev/null && break; done) && open http://localhost:5000/) &)
./manage.py devserver
shell:
./manage.py shell
celery:
./manage.py celerydev
style:
flake8 --max-line-length=120 --statistics pypi_portal
lint:
pylint --max-line-length=120 pypi_portal
test:
py.test --cov-report term-missing --cov pypi_portal tests
testpdb:
py.test --pdb tests
testcovweb:
py.test --cov-report html --cov pypi_portal tests
open htmlcov/index.html
pipinstall: isvirtualenv
# For development environments. Symlinks are for PyCharm inspections to work with Flask-Statics-Helper.
pip install -r requirements.txt flake8 pylint ipython pytest-cov
[ -h pypi_portal/templates/flask_statics_helper ] || ln -s `python -c "$(PYCODE)"`/templates/flask_statics_helper \
pypi_portal/templates/flask_statics_helper
[ -h pypi_portal/static/flask_statics_helper ] || ln -s `python -c "$(PYCODE)"`/static \
pypi_portal/static/flask_statics_helper
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化