-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (26 loc) · 723 Bytes
/
Makefile
File metadata and controls
37 lines (26 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
PYTHON_VERSION = 2.7
REQUIREMENTS = requirements.txt
VIRTUAL_ENV := .venv$(PYTHON_VERSION)
PYTHON := $(VIRTUAL_ENV)/bin/python
PIP_CONF = pip.conf
PYPI = dev
test: venv
$(PYTHON) -m unittest babelvueextractor.tests
venv_init:
if [ ! -d $(VIRTUAL_ENV) ]; then \
virtualenv -p python$(PYTHON_VERSION) --prompt="($(PROJECT)) " $(VIRTUAL_ENV); \
fi
venv: venv_init
cp $(PIP_CONF) $(VIRTUAL_ENV)/ || true
$(VIRTUAL_ENV)/bin/pip install -r $(REQUIREMENTS)
clean_venv:
rm -rf $(VIRTUAL_ENV)
clean_pyc:
find . -name \*.pyc -delete
clean: clean_venv clean_pyc
package:
$(PYTHON) setup.py sdist
pkg_upload:
$(PYTHON) setup.py sdist upload -r $(PYPI)
pkg_register:
$(PYTHON) setup.py sdist register -r $(PYPI)