projects
/
osm
/
openvim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide openflow information at network show
[osm/openvim.git]
/
Makefile
diff --git
a/Makefile
b/Makefile
index
3214870
..
553d349
100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-1,25
+1,36
@@
#!/usr/bin/env bash
#!/usr/bin/env bash
+.PHONY: all test clean
+
SHELL := /bin/bash
SHELL := /bin/bash
-all: clean build pip install
-lite: clean build_lite pip_lite install_lite
+all:
+ $(MAKE) clean_build build
+ $(MAKE) clean_build openvim
+ $(MAKE) clean_build build_lite
+ $(MAKE) clean_build lite
+
+openvim: package_openvim
+
+lite: package_lib_openvim
-clean
_deb:
+clean
: clean_build
rm -rf .build
rm -rf .build
-clean:
+
+clean_build:
rm -rf build
find osm_openvim -name '*.pyc' -delete
find osm_openvim -name '*.pyo' -delete
prepare_lite:
rm -rf build
find osm_openvim -name '*.pyc' -delete
find osm_openvim -name '*.pyo' -delete
prepare_lite:
- pip install --user --upgrade setuptools
+
#
pip install --user --upgrade setuptools
mkdir -p build
mkdir -p build
- VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
- VER2=$(shell git describe | cut -d- -f2); \
- VER3=$(shell git describe | cut -d- -f3); \
- echo "$$VER1.dev$$VER2+$$VER3" > build/OVIM_VERSION
+ #VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
+ #VER2=$(shell git describe | cut -d- -f2); \
+ #VER3=$(shell git describe | cut -d- -f3); \
+ #echo "$$VER1.dev$$VER2+$$VER3" > build/OVIM_VERSION
+ cp tox.ini build/
cp MANIFEST.in build/
cp MANIFEST.in build/
- sed -i "s/include OPENVIM_VERSION/include OVIM_VERSION/g" build/MANIFEST.in
+
#
sed -i "s/include OPENVIM_VERSION/include OVIM_VERSION/g" build/MANIFEST.in
sed -i "s/recursive-include osm_openvim/recursive-include lib_osm_openvim/g" build/MANIFEST.in
sed -i "s/include openflow/include openflow-lib/g" build/MANIFEST.in
sed -i '/include openvimd/d' build/MANIFEST.in
sed -i "s/recursive-include osm_openvim/recursive-include lib_osm_openvim/g" build/MANIFEST.in
sed -i "s/include openflow/include openflow-lib/g" build/MANIFEST.in
sed -i '/include openvimd/d' build/MANIFEST.in
@@
-36,14
+47,16
@@
prepare_lite:
sed -i "s/from osm_openvim/from lib_osm_openvim/g" build/openflow-lib
sed -i "s/import osm_openvim/import lib_osm_openvim/g" build/openflow-lib
sed -i "s/import osm_openvim; print osm_openvim\.__path__\[0\]/import lib_osm_openvim; print lib_osm_openvim\.__path__\[0\]/g" build/lib_osm_openvim/database_utils/migrate_vim_db.sh
sed -i "s/from osm_openvim/from lib_osm_openvim/g" build/openflow-lib
sed -i "s/import osm_openvim/import lib_osm_openvim/g" build/openflow-lib
sed -i "s/import osm_openvim; print osm_openvim\.__path__\[0\]/import lib_osm_openvim; print lib_osm_openvim\.__path__\[0\]/g" build/lib_osm_openvim/database_utils/migrate_vim_db.sh
+ sed -i "s/__import__(\"osm_openvim\.\"/__import__(\"lib_osm_openvim\.\"/g" build/lib_osm_openvim/ovim.py
prepare:
prepare:
- pip install --user --upgrade setuptools
+
#
pip install --user --upgrade setuptools
mkdir -p build
mkdir -p build
- VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
- VER2=$(shell git describe | cut -d- -f2); \
- VER3=$(shell git describe | cut -d- -f3); \
- echo "$$VER1.dev$$VER2+$$VER3" > build/OPENVIM_VERSION
+ #VER1=$(shell git describe | sed -e 's/^v//' |cut -d- -f1); \
+ #VER2=$(shell git describe | cut -d- -f2); \
+ #VER3=$(shell git describe | cut -d- -f3); \
+ #echo "$$VER1.dev$$VER2+$$VER3" > build/OPENVIM_VERSION
+ cp tox.ini build/
cp MANIFEST.in build/
cp README.rst build/
cp setup.py build/
cp MANIFEST.in build/
cp README.rst build/
cp setup.py build/
@@
-60,17
+73,19
@@
prepare:
build: prepare
python -m py_compile build/osm_openvim/*.py
build: prepare
python -m py_compile build/osm_openvim/*.py
+ #cd build && tox -e flake8
build_lite: prepare_lite
python -m py_compile build/lib_osm_openvim/*.py
build_lite: prepare_lite
python -m py_compile build/lib_osm_openvim/*.py
+ #cd build && tox -e flake8
-pip:
clean
build
+pip: build
cd build && ./setup.py sdist
cd build && ./setup.py sdist
-pip_lite:
clean
build_lite
+pip_lite: build_lite
cd build && ./setup.py sdist
cd build && ./setup.py sdist
-package_openvim:
clean
prepare
+package_openvim: prepare
#apt-get install -y python-stdeb
cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True
cd build && cp osm_openvim/scripts/python-osm-openvim.postinst deb_dist/osm-openvim*/debian/
#apt-get install -y python-stdeb
cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True
cd build && cp osm_openvim/scripts/python-osm-openvim.postinst deb_dist/osm-openvim*/debian/
@@
-78,28
+93,23
@@
package_openvim: clean prepare
mkdir -p .build
cp build/deb_dist/python-*.deb .build/
mkdir -p .build
cp build/deb_dist/python-*.deb .build/
-package_lib
: clean
prepare_lite
+package_lib
_openvim:
prepare_lite
#apt-get install -y python-stdeb
#apt-get install -y python-stdeb
- cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True
- cd build/deb_dist/lib-osm-openvim* && dpkg-buildpackage -rfakeroot -uc -us
+ #cd build && python setup.py --command-packages=stdeb.command sdist_dsc --with-python2=True
+ #cd build/deb_dist/lib-osm-openvim* && dpkg-buildpackage -rfakeroot -uc -us
+ cd build && python setup.py --command-packages=stdeb.command bdist_deb
mkdir -p .build
cp build/deb_dist/python-*.deb .build/
mkdir -p .build
cp build/deb_dist/python-*.deb .build/
-package: clean_deb package_openvim package_lib
-
snap:
echo "Nothing to be done yet"
install: clean build
snap:
echo "Nothing to be done yet"
install: clean build
+ #cd build/dist; pip install --user osm_openvim*
cd build/dist; pip install osm_openvim*
install_lite: clean build_lite
cd build/dist; pip install osm_openvim*
install_lite: clean build_lite
+ #cd build/dist; pip install --user lib_osm_openvim-*
cd build/dist; pip install lib_osm_openvim-*
cd build/dist; pip install lib_osm_openvim-*
-
-
-
-
-
-