X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FIM.git;a=blobdiff_plain;f=Makefile;h=4faeb5f34a75f6538ac8baf3d4d476c59c96c518;hp=5f3b235210f0334709355805459967ff5c500500;hb=6f5f5dd9f974a2cb2138a2685712aa90d8c34bdf;hpb=e4eafa8b6aaa60f86ba7dcd3f4ecc98e055b82f4 diff --git a/Makefile b/Makefile index 5f3b235..4faeb5f 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,8 @@ # NOTE: pyang and pyangbind are required for build PYANG:= pyang -PYBINDPLUGIN:=$(shell /usr/bin/env python -c \ - 'import pyangbind; import os; print "%s/plugin" % os.path.dirname(pyangbind.__file__)') +PYBINDPLUGIN:=$(shell /usr/bin/env python3 -c \ + 'import pyangbind; import os; print("{}/plugin".format(os.path.dirname(pyangbind.__file__)))') YANG_DESC_MODELS := vnfd nsd YANG_RECORD_MODELS := vnfr nsr @@ -36,7 +36,7 @@ Q?=@ PYANG_OPTIONS := -Werror -all: $(PYTHON_MODELS) pyangbind +all: $(PYTHON_MODELS) pyangbind trees $(MAKE) package trees: $(YANG_DESC_TREES) $(YANG_DESC_JSTREES) $(YANG_RECORD_TREES) $(YANG_RECORD_JSTREES) @@ -63,6 +63,8 @@ $(TREES_DIR): %.html: $(TREES_DIR) $(Q)echo generating $@ from $*.yang $(Q)pyang $(PYANG_OPTIONS) --path build/yang --path $(MODEL_DIR) -f jstree -o $(TREES_DIR)/$@ $(MODEL_DIR)/$*.yang + $(Q)sed -r -i 's|data\:image/gif\;base64,R0lGODlhS.*RCAA7|https://osm.etsi.org/images/OSM-logo.png\" width=\"175\" height=\"60|g' $(TREES_DIR)/$@ + $(Q)sed -r -i 's|||g' $(TREES_DIR)/$@ %.rec.tree.txt: $(TREES_DIR) $(Q)echo generating $@ from $*.yang @@ -72,6 +74,8 @@ $(TREES_DIR): %.rec.html: $(TREES_DIR) $(Q)echo generating $@ from $*.yang $(Q)pyang $(PYANG_OPTIONS) --path build/yang --path $(MODEL_DIR) -f jstree -o $(TREES_DIR)/$@ $(MODEL_DIR)/rw-project.yang $(MODEL_DIR)/$*.yang + $(Q)sed -r -i 's|data\:image/gif\;base64,R0lGODlhS.*RCAA7|https://osm.etsi.org/images/OSM-logo.png\" width=\"175\" height=\"60|g' $(TREES_DIR)/$@ + $(Q)sed -r -i 's|||g' $(TREES_DIR)/$@ $(Q)mv $(TREES_DIR)/$@ $(TREES_DIR)/$*.html $(RW_PB_EXT): @@ -80,16 +84,25 @@ $(RW_PB_EXT): package: tox -e build + tox -e build3 + ./build-docs.sh + pyangbind: pyang - git clone https://github.com/robshakir/pyangbind - cd pyangbind; python setup.py --command-packages=stdeb.command bdist_deb; cd .. + git clone https://github.com/alf-tierno/pyangbind + cd pyangbind; git checkout issue151; \ + python setup.py --command-packages=stdeb.command bdist_deb; \ + python3 setup.py --command-packages=stdeb.command bdist_deb; \ + cd .. mkdir -p deb_dist cp pyangbind/deb_dist/*.deb deb_dist pyang: git clone https://github.com/mbj4668/pyang - cd pyang; python setup.py --command-packages=stdeb.command bdist_deb; cd .. + cd pyang; \ + python setup.py --command-packages=stdeb.command bdist_deb; \ + python3 setup.py --command-packages=stdeb.command bdist_deb; \ + cd .. mkdir -p deb_dist cp pyang/deb_dist/*.deb deb_dist