ff-tool/Makefile

55 строки
1.3 KiB
Makefile
Исходник Обычный вид История

2016-02-19 22:54:36 +03:00
HERE = $(shell pwd)
VENV = $(HERE)/venv
BIN = $(VENV)/bin
PYTHON = $(BIN)/python
PIP = $(BIN)/pip
INSTALL = $(PIP) install
SPHINX_BUILDDIR = docs/_build
INSTALL_STAMP = $(VENV)/.install.stamp
.PHONY: all build test clean pypi testpypi pypi-register testpypi-register
all: build test
build: $(VENV)/COMPLETE
$(VENV)/COMPLETE: requirements.txt
virtualenv --no-site-packages --python=`which python` \
--distribute $(VENV)
$(INSTALL) -r requirements.txt
$(PYTHON) setup.py develop
touch $(VENV)/COMPLETE
test:
$(INSTALL) -r requirements.txt
tox
clean:
rm -rf venv *egg* dist ./docs/_build .tox _temp
2016-03-15 03:36:49 +03:00
mkdir -p _temp/{browsers,profiles}
2016-02-19 22:54:36 +03:00
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d -exec rm -fr {} \;
#---------------------------------------
# for dev branch only
#---------------------------------------
# Create dist, egg dirs, upload package to pypi
pypi:
$(PYTHON) setup.py sdist upload -r pypi
$(PYTHON) setup.py bdist_egg upload -r pypi
# Create dist, egg dirs, upload package to testpypi
testpypi:
$(PYTHON) setup.py sdist upload -r testpypi
$(PYTHON) setup.py bdist_egg upload -r testpypi
# Register this project to Python Package Index
pypi-register:
$(PYTHON) setup.py register -r pypi
# Register this project to Test Python Package Index
testpypi-register:
$(PYTHON) setup.py register -r testpypi