forked from saitoha/PySixel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
61 lines (47 loc) · 1.45 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
PACKAGE_NAME=PySixel
DEPENDENCIES=Pillow
PYTHON=python
SETUP_SCRIPT=setup.py
RM=rm -rf
PIP=pip
CYTHON=cython
.PHONY: smoketest nosetest build setuptools install uninstall clean update
build: smoketest
ln -f sixel/converter.py /tmp/sixel_cimpl.pyx
$(CYTHON) /tmp/sixel_cimpl.pyx -o sixel/sixel_cimpl.c
$(PYTHON) $(SETUP_SCRIPT) sdist
$(PYTHON) $(SETUP_SCRIPT) bdist_egg
setup_environment:
if test -d tools; do \
ln -f tools/gitignore .gitignore \
ln -f tools/vimprojects .vimprojects \
fi
setuptools:
$(PYTHON) -c "import setuptools" || \
curl http://peak.telecommunity.com/dist/ez_$(SETUP_SCRIPT) | $(PYTHON)
install: smoketest setuptools build
$(PYTHON) $(SETUP_SCRIPT) install
uninstall:
for package in $(PACKAGE_NAME) $(DEPENDENCIES); \
do \
$(PIP) uninstall -y $$package; \
done
clean:
for name in dist cover build *.egg-info *.egg htmlcov; \
do find . -type d -name $$name || true; \
done | xargs $(RM)
for name in *.pyc *.o .coverage; \
do find . -type f -name $$name || true; \
done | xargs $(RM)
test: smoketest nosetest
smoketest:
$(PYTHON) $(SETUP_SCRIPT) test
nosetest:
update: build clean test
$(PYTHON) $(SETUP_SCRIPT) register
$(PYTHON) $(SETUP_SCRIPT) sdist upload
$(PYTHON) $(SETUP_SCRIPT) bdist_egg upload
cleanupdate: update
ssh zuse.jp "rm -rf $(PACKAGE_NAME)"
ssh zuse.jp "git clone [email protected]:saitoha/$(PACKAGE_NAME) --recursive"
ssh zuse.jp "cd $(PACKAGE_NAME) && $(PYTHON) $(SETUP_SCRIPT) bdist_egg upload"