From cf1826b8466193d53981fe6c61d78e9746b816f1 Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 18 Apr 2017 10:03:17 +0200 Subject: [PATCH] Updated Makefile with install and develop; renamed openmanod.py to remove extension Change-Id: Ie9f62cd763fa8c74f1222e3533d15b6167a33c4a Signed-off-by: garciadeblas --- MANIFEST.in | 2 +- Makefile | 20 +++++++++++++------- openmanod.py => openmanod | 0 osm-ro.service | 2 +- osm_ro/__init__.py | 0 setup.py | 2 +- 6 files changed, 16 insertions(+), 10 deletions(-) rename openmanod.py => openmanod (100%) create mode 100644 osm_ro/__init__.py diff --git a/MANIFEST.in b/MANIFEST.in index 154ea275..f586ebf3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,7 +2,7 @@ #include requirements.txt include README.rst include openmano -include openmanod.py +include openmanod include openmanod.cfg include osm-ro.service recursive-include osm_ro * diff --git a/Makefile b/Makefile index 76a29908..2c7255b3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SHELL := /bin/bash -all: pypackage debpackage +all: pip deb prepare: mkdir -p build/ @@ -9,7 +9,7 @@ prepare: cp setup.py build/ cp -r osm_ro build/ cp openmano build/ - cp openmanod.py build/ + cp openmanod build/ cp openmanod.cfg build/ cp osm-ro.service build/ cp -r vnfs build/osm_ro @@ -28,18 +28,24 @@ connectors: prepare build: connectors prepare python -m py_compile build/osm_ro/*.py -pypackage: prepare - cd build; ./setup.py sdist - cd build; ./setup.py bdist_wheel +pip: prepare + cd build && ./setup.py sdist + cd build && ./setup.py bdist_wheel -debpackage: prepare +deb: prepare echo "Nothing to be done" #cd build; ./setup.py --command-packages=stdeb.command bdist_deb #fpm -s python -t deb build/setup.py -snappackage: +snap: echo "Nothing to be done yet" +install: + cd build && pip install dist/*.tar.gz + +develop: prepare + cd build && ./setup.py develop + sync: #cp build/dist/* /root/artifacts/... diff --git a/openmanod.py b/openmanod similarity index 100% rename from openmanod.py rename to openmanod diff --git a/osm-ro.service b/osm-ro.service index 155150b7..cc8966c8 100644 --- a/osm-ro.service +++ b/osm-ro.service @@ -3,7 +3,7 @@ Description=openmano server (OSM RO) [Service] User=${USER_OWNER} -ExecStart=openmanod.py -c /etc/osm/openmanod.cfg --log-file=/var/log/osm/openmano.log +ExecStart=openmanod -c /etc/osm/openmanod.cfg --log-file=/var/log/osm/openmano.log Restart=always [Install] diff --git a/osm_ro/__init__.py b/osm_ro/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/setup.py b/setup.py index 68781be1..20b6c3a4 100755 --- a/setup.py +++ b/setup.py @@ -61,7 +61,7 @@ setup(name=_name, data_files = [('/etc/osm/', ['openmanod.cfg']), ('/etc/systemd/system/', ['osm-ro.service']), ], - scripts=['openmanod.py', 'openmano', 'osm_ro/scripts/service-openmano.sh', 'osm_ro/scripts/openmano-report.sh',], + scripts=['openmanod', 'openmano', 'osm_ro/scripts/service-openmano.sh', 'osm_ro/scripts/openmano-report.sh',], install_requires=_requirements, include_package_data=True, cmdclass = {'install': ROInstaller}, -- 2.25.1