forked from benjiec/pychemy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
61 lines (44 loc) · 1.09 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
58
59
60
61
.PHONY: \
image \
clean clean-pyc clean-build clean-cache clean-tox \
test test-tox \
bump/major bump/minor bump/patch \
release
PYCHEMY_HOME ?= /usr/src/pychemy
SETUP = python setup.py
TOXENV ?= py2
all: test-tox
clean: clean-build clean-pyc clean-cache clean-tox
clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
clean-cache:
rm -rf .eggs
clean-tox:
rm -rf .tox
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
test:
python setup.py nosetests
test-tox:
TOXENV=${TOXENV} tox
bump/major bump/minor bump/patch:
bumpversion --verbose ${@F}
release: clean sdist bdist_wheel
twine upload dist/*
sdist:
${SETUP} sdist
ls -l dist
bdist_wheel:
${SETUP} bdist_wheel
ls -l dist
MAKE_EXT = docker-compose run --rm pychemy-${TOXENV} make -C ${PYCHEMY_HOME}
# Generically execute make targets from outside the Docker container
%-ext: image
${MAKE_EXT} $*
# Build the images
image:
GIT_USER_NAME=`git config user.name` GIT_USER_EMAIL=`git config user.email` docker-compose build --pull pychemy-${TOXENV}