File indexing completed on 2025-01-19 04:00:06
0001 PYTHON=python3 0002 SETUP=setup.py 0003 VERSION_SUF:=$(shell git rev-parse --short HEAD) 0004 VERSION_BASE:=$(shell cat version) 0005 VERSION:=$(VERSION_BASE)$(if $(VERSION_SUF),+dev$(VERSION_SUF),) 0006 SRC:=$(shell find lib -type f -name '*.py') lib/lottie/version.py 0007 OBJECTS:=$(shell find lib/lottie/objects -type f -name '*.py') 0008 SCRIPTS:=$(wildcard bin/*.py) 0009 VERSION_IN_FILE=$(shell cat .version_full) 0010 $(if $(VERSION_IN_FILE) != $(VERSION), $(shell echo '$(VERSION)' > .version_full)) 0011 PACKAGE_NAME:=$(shell $(PYTHON) $(SETUP) --name) 0012 0013 .SUFFIXES: 0014 0015 .PHONY: all upload docs clean_pyc pypi blender inkscape release dist distclean synfig version next_version lint 0016 0017 0018 all: pypi blender inkscape synfig 0019 0020 dist: all 0021 0022 distclean: 0023 rm dist/* 0024 0025 release: 0026 make all upload VERSION_SUF= 0027 0028 dist/$(PACKAGE_NAME)-$(VERSION).tar.gz: $(SETUP) $(SRC) $(SCRIPTS) 0029 $(PYTHON) $(SETUP) sdist 0030 0031 upload: dist/$(PACKAGE_NAME)-$(VERSION).tar.gz 0032 $(PYTHON) -m twine upload dist/$(PACKAGE_NAME)-$(VERSION).tar.gz 0033 0034 docs: docs/html/index.html 0035 0036 docs/Doxyfile: docs/Doxyfile.in setup.py 0037 m4 -P -DM4_NAME="python-$(PACKAGE_NAME)" -DM4_VERSION="$(VERSION)" -DM4_DESCRIPTION="$(shell $(PYTHON) $(SETUP) --description)" $< >$@ 0038 0039 docs/dox/lottie.dox: docs/dox_lottie.py 0040 docs/dox/lottie.dox: $(OBJECTS) 0041 $(PYTHON) docs/dox_lottie.py 0042 0043 docs/dox/examples/%.dox: examples/%.py docs/dox_examples.py 0044 $(PYTHON) docs/dox_examples.py $* 0045 0046 docs/dox/downloads.dox: docs/dox_download.py setup.py 0047 $(PYTHON) docs/dox_download.py --version-base $(VERSION_BASE) --version-suf $(VERSION_SUF) --version $(VERSION) 0048 0049 docs/html/index.html: docs/Doxyfile 0050 docs/html/index.html: $(foreach file,$(wildcard examples/*.py), docs/dox/examples/$(basename $(notdir $(file))).dox) 0051 docs/html/index.html: docs/dox/lottie.dox 0052 docs/html/index.html: docs/dox/scripts.dox 0053 docs/html/index.html: docs/dox/downloads.dox 0054 docs/html/index.html: $(SRC) 0055 doxygen docs/Doxyfile 0056 0057 dist/$(PACKAGE_NAME)-inkscape-$(VERSION).zip: $(wildcard addons/inkscape/*) 0058 zip --junk-paths $@ $^ 0059 echo "Upload at https://inkscape.org/~mattia.basaglia/%E2%98%85tgslottie-importexport" 0060 0061 docs/dox/scripts.dox: docs/dox_scripts.py 0062 docs/dox/scripts.dox: $(SCRIPTS) 0063 $(PYTHON) docs/dox_scripts.py 0064 0065 clean_pyc: 0066 find lib -name '*.pyc' -delete 0067 find lib -name '__pycache__' -exec rm -rf {} \; 0068 0069 0070 dist/$(PACKAGE_NAME)-blender-$(VERSION).zip: $(wildcard addons/blender/lottie_io/*.py) $(SRC) 0071 addons/update_version.py 0072 cd addons/blender && find -L -name '*.py' | xargs zip --filesync ../../$@ 0073 0074 dist/$(PACKAGE_NAME)-synfig-$(VERSION).zip: $(wildcard addons/synfig/*) $(SRC) 0075 cd addons/synfig && find -L -type f -not -name "*.pyc" | xargs zip --filesync ../../$@ 0076 0077 pypi: dist/$(PACKAGE_NAME)-$(VERSION).tar.gz 0078 0079 inkscape: dist/$(PACKAGE_NAME)-inkscape-$(VERSION).zip 0080 0081 blender: dist/$(PACKAGE_NAME)-blender-$(VERSION).zip 0082 0083 synfig: dist/$(PACKAGE_NAME)-synfig-$(VERSION).zip 0084 0085 lib/lottie/version.py: .version_full 0086 echo '__version__ = "$(VERSION)"' > $@ 0087 0088 version: lib/lottie/version.py 0089 $(PYTHON) $(SETUP) --version 0090 0091 next_version: VERSION = $(shell echo 'x = "$(VERSION_BASE)".split("."); x[-1] = str(int(x[-1]) + 1); print(".".join(x))' | python) 0092 next_version: 0093 echo $(VERSION) >version 0094 0095 lint: 0096 flake8 lib/$(PACKAGE_NAME)