forked from python-social-auth/social-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
57 lines (46 loc) · 1.58 KB
/
Makefile
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
PYTHON_VERSIONS := 2.7.12 3.4.4 3.5.2 pypy-4.0.1
build:
@ BUILD_VERSION=2 python setup.py sdist
@ BUILD_VERSION=2 python setup.py bdist_wheel --python-tag py2
@ BUILD_VERSION=3 python setup.py bdist_wheel --python-tag py3
publish:
@ BUILD_VERSION=2 python setup.py sdist upload
@ BUILD_VERSION=2 python setup.py bdist_wheel --python-tag py2 upload
@ BUILD_VERSION=3 python setup.py bdist_wheel --python-tag py3 upload
check-pyenv:
@ which pyenv
# Dependencies: libxml2-dev libxmlsec1-dev libbz2-dev libsqlite3-dev
# libreadline-dev zlib1g-dev libncurses5-dev libssl-dev
# libgdbm-dev libncursesw5-dev xz-utils swig build-essential
setup-pyenv-python:
@ pyenv install -s $(version)
@ pyenv local $(version)
@ pip install --upgrade setuptools pip tox
@ pyenv local --unset
setup-pyenv: check-pyenv
@ eval "$(pyenv init -)"
@ $(foreach version, \
$(PYTHON_VERSIONS), \
${MAKE} setup-pyenv-python version=$(version);)
@ pyenv local $(PYTHON_VERSIONS)
run-tox:
@ tox
docker-tox-build:
@ docker inspect omab/psa-social-core >/dev/null 2>&1 || ( \
docker build -t omab/psa-social-core . \
)
docker-tox: docker-tox-build
@ docker run -it --rm \
--name psa-social-core-test \
-v "`pwd`:/code" \
-w /code omab/psa-social-core tox
docker-bash: docker-tox-build
@ docker run -it --rm \
--name psa-social-core-test \
-v "`pwd`:/code" \
-w /code omab/psa-social-core bash
tests: setup-pyenv run-tox clean
clean:
@ find . -name '*.py[co]' -delete
@ find . -name '__pycache__' -delete
@ rm -rf *.egg-info dist build