2011-01-12 18:05:55 +00:00
|
|
|
PYTHON = python
|
|
|
|
CHECKSCRIPT = kivy/tools/pep8checker/pep8kivy.py
|
|
|
|
KIVY_DIR = kivy/
|
2012-03-09 01:27:40 +00:00
|
|
|
HOSTPYTHON = $(KIVYIOSROOT)/tmp/Python-$(PYTHON_VERSION)/hostpython
|
2011-05-14 18:46:46 +00:00
|
|
|
IOSPATH := $(PATH):/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
|
2011-01-12 18:05:55 +00:00
|
|
|
|
2011-05-12 08:12:38 +00:00
|
|
|
.PHONY: build force mesabuild pdf style stylereport hook test batchtest cover clean distclean
|
2011-04-23 16:08:31 +00:00
|
|
|
|
2011-01-16 15:55:21 +00:00
|
|
|
build:
|
|
|
|
$(PYTHON) setup.py build_ext --inplace
|
|
|
|
|
2011-03-24 18:05:20 +00:00
|
|
|
force:
|
|
|
|
$(PYTHON) setup.py build_ext --inplace -f
|
|
|
|
|
2011-03-16 12:53:35 +00:00
|
|
|
mesabuild:
|
2011-12-19 11:20:09 +00:00
|
|
|
/usr/bin/env USE_MESAGL=1 $(PYTHON) setup.py build_ext --inplace
|
2011-03-16 12:53:35 +00:00
|
|
|
|
2012-02-24 01:09:45 +00:00
|
|
|
ios:
|
2011-12-01 16:45:33 +00:00
|
|
|
-ln -s $(KIVYIOSROOT)/Python-2.7.1/python
|
|
|
|
-ln -s $(KIVYIOSROOT)/Python-2.7.1/python.exe
|
2011-05-12 08:12:38 +00:00
|
|
|
|
2011-05-12 09:54:22 +00:00
|
|
|
-rm -rdf iosbuild/
|
|
|
|
mkdir iosbuild
|
|
|
|
|
2011-05-12 08:12:38 +00:00
|
|
|
echo "First build ========================================"
|
2012-02-25 10:38:19 +00:00
|
|
|
-PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py build_ext -g
|
2011-05-12 08:12:38 +00:00
|
|
|
echo "cythoning =========================================="
|
2012-02-25 10:38:19 +00:00
|
|
|
find . -name *.pyx -exec cython -t {} \;
|
2011-05-12 08:12:38 +00:00
|
|
|
echo "Second build ======================================="
|
2011-12-01 16:45:33 +00:00
|
|
|
PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py build_ext -g
|
2011-12-02 18:23:28 +00:00
|
|
|
PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py install -O2 --root iosbuild
|
2011-05-12 09:54:22 +00:00
|
|
|
# Strip away the large stuff
|
|
|
|
find iosbuild/ | grep -E '*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
|
2011-12-06 09:51:47 +00:00
|
|
|
-rm -rdf "$(BUILDROOT)/python/lib/python2.7/site-packages/kivy"
|
2011-05-12 09:54:22 +00:00
|
|
|
# Copy to python for iOS installation
|
2011-12-06 09:51:47 +00:00
|
|
|
cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$(BUILDROOT)/python/lib/python2.7/site-packages"
|
2011-05-12 08:12:38 +00:00
|
|
|
|
2011-03-16 12:48:07 +00:00
|
|
|
pdf:
|
|
|
|
$(MAKE) -C doc latex && make -C doc/build/latex all-pdf
|
|
|
|
|
2011-06-24 13:56:24 +00:00
|
|
|
html:
|
|
|
|
$(MAKE) -C doc html
|
|
|
|
|
2011-01-12 18:05:55 +00:00
|
|
|
style:
|
|
|
|
$(PYTHON) $(CHECKSCRIPT) $(KIVY_DIR)
|
|
|
|
|
|
|
|
stylereport:
|
|
|
|
$(PYTHON) $(CHECKSCRIPT) -html $(KIVY_DIR)
|
2011-01-13 14:25:07 +00:00
|
|
|
|
|
|
|
hook:
|
2011-03-16 12:48:07 +00:00
|
|
|
# Install pre-commit git hook to check your changes for styleguide
|
|
|
|
# consistency.
|
2011-01-13 14:25:07 +00:00
|
|
|
cp kivy/tools/pep8checker/pre-commit.githook .git/hooks/pre-commit
|
|
|
|
chmod +x .git/hooks/pre-commit
|
2011-01-20 23:02:29 +00:00
|
|
|
|
|
|
|
test:
|
2011-01-27 15:42:48 +00:00
|
|
|
-rm -rf kivy/tests/build
|
2011-10-14 14:14:24 +00:00
|
|
|
nosetests kivy/tests
|
2011-01-27 15:42:48 +00:00
|
|
|
|
|
|
|
batchtest:
|
2011-01-27 02:38:24 +00:00
|
|
|
-rm -rf kivy/tests/build
|
|
|
|
nosetests kivy/tests
|
2011-01-20 23:02:29 +00:00
|
|
|
|
|
|
|
cover:
|
2012-01-20 12:18:46 +00:00
|
|
|
coverage html --include='$(KIVY_DIR)*' --omit '$(KIVY_DIR)data/*,$(KIVY_DIR)lib/*,$(KIVY_DIR)tools/*,$(KIVY_DIR)tests/*'
|
2011-01-20 23:11:42 +00:00
|
|
|
|
2012-01-02 19:10:03 +00:00
|
|
|
install:
|
|
|
|
python setup.py install
|
2011-01-20 23:11:42 +00:00
|
|
|
clean:
|
2011-02-03 22:33:24 +00:00
|
|
|
-rm -rf doc/build
|
2011-01-20 23:11:42 +00:00
|
|
|
-rm -rf build
|
|
|
|
-rm -rf htmlcov
|
|
|
|
-rm .coverage
|
|
|
|
-rm .noseids
|
2011-01-27 02:38:24 +00:00
|
|
|
-rm -rf kivy/tests/build
|
2011-01-30 13:59:02 +00:00
|
|
|
-find kivy -iname '*.pyc' -exec rm {} \;
|
|
|
|
-find kivy -iname '*.pyo' -exec rm {} \;
|
2011-01-20 23:11:42 +00:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
-git clean -dxf
|