X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=setup.py;h=4d1c9e963c6b984940b70ca3cc657918a64f7e8f;hb=bd458dbed1a932a5a97fb245f378f5a16d6642d4;hp=dfa5cee57b5391ccd67dddbefb9020a0c738beff;hpb=76f6a62b4cc15bc77cf1270d2b1630524fb2879f;p=osm%2FIM.git diff --git a/setup.py b/setup.py index dfa5cee..4d1c9e9 100644 --- a/setup.py +++ b/setup.py @@ -30,16 +30,22 @@ class Install_osm_im(install): subprocess.call([sys.executable, "-m", "pip", "install", package]) def run(self): - self.pipinstall('pyang') - self.pipinstall('pyangbind') - import pyangbind - print("Using dir {}/{} for python artifacts".format(os.getcwd(), self.im_dir)) - path = "{}/{}".format(os.getcwd(), self.im_dir) protoc_command = ["make", "models"] if subprocess.call(protoc_command) != 0: sys.exit(-1) + # To ensure generated files are copied to the python installation folder - self.copy_tree(self.im_dir, "{}{}".format(self.install_lib, self.im_dir)) + install_path = "{}{}".format(self.install_lib, self.im_dir) + self.copy_tree(self.im_dir, install_path) + if os.path.isfile("{}/etsi-nfv-nsd.py".format(install_path)): + self.move_file( + "{}/etsi-nfv-nsd.py".format(install_path), "{}/etsi_nfv_nsd.py".format(install_path) + ) + if os.path.isfile("{}/etsi-nfv-vnfd.py".format(install_path)): + self.move_file( + "{}/etsi-nfv-vnfd.py".format(install_path), "{}/etsi_nfv_vnfd.py".format(install_path) + ) + install.run(self) @@ -48,12 +54,11 @@ setup( description='OSM Information Model', long_description=open('README.rst').read(), version_command=('git describe --tags --long --dirty --match v*', 'pep440-git-full'), - author='Mike Marchetti', - author_email='mmarchetti@sandvine.com', + author='OSM Support', + author_email='osmsupport@etsi.org', packages=find_packages(), include_package_data=True, setup_requires=['setuptools-version-command'], - install_requires=['pyang', 'pyangbind'], test_suite='nose.collector', url='https://osm.etsi.org/gitweb/?p=osm/IM.git;a=summary', license='Apache 2.0',