-
Notifications
You must be signed in to change notification settings - Fork 24
/
Makefile
57 lines (45 loc) · 1.36 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
# Shortcuts for various tasks (UNIX only).
# To use a specific Python version run:
# $ make install PYTHON=python3.3
# You can set these variables from the command line.
PYTHON = python
TSCRIPT = test/test_sendfile.py
all: test
clean:
rm -f `find . -type f -name \*.py[co]`
rm -f `find . -type f -name \*.so`
rm -f `find . -type f -nam1e .\*~`
rm -f `find . -type f -name \*.orig`
rm -f `find . -type f -name \*.bak`
rm -f `find . -type f -name \*.rej`
rm -rf `find . -type d -name __pycache__`
rm -rf *.egg-info
rm -rf *\$testfile*
rm -rf .tox
rm -rf build
rm -rf dist
build: clean
$(PYTHON) setup.py build
install: build
if test $(PYTHON) = python2.5; then \
$(PYTHON) setup.py install; \
else \
$(PYTHON) setup.py install --user; \
fi
uninstall:
cd ..; $(PYTHON) -m pip uninstall -y -v pysendfile; \
test: install
$(PYTHON) $(TSCRIPT)
pep8:
@git ls-files | grep \\.py$ | xargs $(PYTHON) -m pep8
pyflakes:
@export PYFLAKES_NODOCTEST=1 && \
git ls-files | grep \\.py$ | xargs $(PYTHON) -m pyflakes
flake8:
@git ls-files | grep \\.py$ | xargs $(PYTHON) -m flake8
# upload source tarball on https://pypi.python.org/pypi/pysendfile.
upload-src: clean
$(PYTHON) setup.py sdist upload
# git-tag a new release
git-tag-release:
git tag -a release-`python -c "import setup; print(setup.VERSION)"` -m `git rev-list HEAD --count`:`git rev-parse --short HEAD`