From: mirabal Date: Thu, 6 Apr 2017 09:01:05 +0000 (+0200) Subject: setup.py fix for non py files during installation X-Git-Tag: v2.0.0~23^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=622e55de483eba5f4becfdd1a66008a49e65bf1d;p=osm%2Fopenvim.git setup.py fix for non py files during installation Change-Id: I6a0d3b4aa01109649a5c85b292dedc28d6e62087 Signed-off-by: mirabal --- diff --git a/Makefile b/Makefile index 5e49091..03b2f8b 100644 --- a/Makefile +++ b/Makefile @@ -8,13 +8,12 @@ prepare: mkdir -p build cp *.py build/ cp MANIFEST.in build/ - cp openvimd.py build/openvimd - cp ovim.py build/ovim + cp openvimd.py openvimd; cp openvimd build/openvimd + cp ovim.py ovim; cp ovim build/ovim cp openvim build/ cp openflow build/ cp openvimd.cfg build/ cp -r scripts build/ - #cd build/scripts; mv service-openvim.sh service-openvim; mv openvim-report.sh openvim-report; mv initopenvim.sh initopenvim cp -r database_utils build/ build: prepare @@ -22,15 +21,18 @@ build: prepare clean: rm -rf build + rm -rf openvimd ovim pip: cd build; ./setup.py sdist install: - cd build; python setup.py install + cd build/dist; pip install lib* install_lite: - cd build; python setup.py install --lite + cd build/dist; pip install lib* + + diff --git a/setup.py b/setup.py index fda3184..1d3138f 100755 --- a/setup.py +++ b/setup.py @@ -15,6 +15,8 @@ __maintainer_email__ = 'leonardo.mirabal@altran.com' __license__ = 'Apache 2.0' __url__ = 'https://osm.etsi.org/gitweb/?p=osm/openvim.git;a=summary' +cmd = 'cp ovim.py ovim' +system(cmd) __data_files__ = [('osm/openvim/', ['openvimd.cfg']), ('osm/openvim/database_utils/', ['database_utils/vim_db_structure.sql', @@ -62,7 +64,7 @@ _req = [ "libvirt-python" ] -__scripts__ = ['openflow', 'ovim'] +__scripts__ = ['openflow', 'openvim', 'ovim'] class LibOpenvimInstaller(install): @@ -78,30 +80,12 @@ class LibOpenvimInstaller(install): def run(self): - cmd = 'ln -sf -v /usr/local/osm/openvim/openvimd.cfg /etc/default/openvimd.cfg ' + cmd = 'ln -sf -v /usr/local/osm/openvim/openvimd.cfg /etc/default/openvimd.cfg' system(cmd) cmd = 'ln -sf -v /usr/local/osm/openvim/openflow /usr/bin/openflow' system(cmd) cmd = 'ln -sf -v /usr/local/osm/openvim/ovim.py /usr/bin/ovim' system(cmd) - if not self.lite: - __scripts__.append('openvim') - __scripts__.append('openvimd') - - cmd = 'ln -sf -v /usr/local/osm/openvim/openvimd /usr/bin/openvimd' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/openvim /usr/bin/openvim' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/scripts/service-openvim.sh /usr/sbin/service-openvim' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/scripts/openvim-report.sh /usr/sbin/service-report' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/scripts/service-floodlight.sh /usr/sbin/service-floodlight' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/scripts/service-opendaylight.sh /usr/sbin/service-opendaylight' - system(cmd) - cmd = 'ln -sf -v /usr/local/osm/openvim/scripts/initopenvim.sh /usr/sbin/initopenvim' - system(cmd) install.run(self)