blob: 90e7e9b9d94529740a478bfe1d26c89ccd3a2d7f [file] [log] [blame]
Lianhao Lu7676ca52018-03-22 20:39:04 +08001#!/usr/bin/env python
2
3#
4# Copyright (c) 2016-2017 GigaSpaces Technologies Ltd. All rights reserved.
5#
6# Licensed under the Apache License, Version 2.0 (the "License"); you may
7# not use this file except in compliance with the License. You may obtain
8# a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15# License for the specific language governing permissions and limitations
16# under the License.
17#
18
19import os
20from setuptools import find_packages, setup
21import sys
22
23if sys.version_info < (2, 7):
24 sys.exit('VNF SDK requires Python 2.7+')
25if sys.version_info >= (3, 0):
26 sys.exit('VNF SDK does not support Python 3')
27
28
29root_dir = os.path.dirname(__file__)
30install_requires = []
31extras_require = {}
32
33with open(os.path.join(root_dir, 'requirements.txt')) as requirements:
34 for requirement in requirements.readlines():
35 # get rid of comments or trailing comments
36 requirement = requirement.split('#')[0].strip()
37 if not requirement:
38 continue # skip empty and comment lines
39 # dependencies which use environment markers have to go in as
40 # conditional dependencies under "extra_require", see more at:
41 # https://wheel.readthedocs.io/en/latest/index.html#defining-conditional-dependencies
42 if ';' in requirement:
43 package, condition = requirement.split(';')
44 cond_name = ':{0}'.format(condition.strip())
45 extras_require.setdefault(cond_name, [])
46 extras_require[cond_name].append(package.strip())
47 else:
48 install_requires.append(requirement)
49
50version = { }
51with open(os.path.join(root_dir, 'vnfsdk_pkgtools/version.py')) as fp:
52 exec(fp.read(), version)
53
54setup(
55 name='vnfsdk',
56 version=version['__version__'],
57 description='VNFSDK CSAR package tool',
58 long_description="VNFSDK CSAR package tool in ONAP",
59 license='Apache License Version 2.0',
60
61 author='ONAP',
62
63 url='https://git.onap.org/vnfsdk/pkgtools',
64
65 classifiers=[
66 'Development Status :: 4 - Beta',
67 'Environment :: Console',
68 'Environment :: Web Environment',
69 'Intended Audience :: Developers',
70 'Intended Audience :: System Administrators',
71 'License :: OSI Approved :: Apache Software License',
72 'Operating System :: OS Independent',
73 'Programming Language :: Python',
74 'Programming Language :: Python :: 2',
75 'Programming Language :: Python :: 2.7',
76 'Topic :: Software Development :: Libraries :: Python Modules',
77 'Topic :: System :: Networking',
78 'Topic :: System :: Systems Administration'],
79
80 packages=find_packages(exclude=['tests*']),
Lianhao Lu4e3368b2018-08-09 16:45:49 +080081 package_data={'vnfsdk_pkgtools.validator': ['*.yaml']},
Lianhao Lu7676ca52018-03-22 20:39:04 +080082
83 entry_points={
84 'console_scripts': [
85 'vnfsdk = vnfsdk_pkgtools.cli.__main__:main'],
86 'vnfsdk.pkgtools.validator': [
Lianhao Lu40f7a0f2018-08-02 14:48:53 +080087 'toscaparser = vnfsdk_pkgtools.validator.toscaparser_validator:ToscaparserValidator',
Lianhao Lu0af46242018-08-29 18:17:46 +080088 ],
89 'vnfsdk.pkgtools.vnfreq': [
Lianhao Lu7debff02018-08-30 11:04:38 +080090 'R-04298 = vnfsdk_pkgtools.vnfreq.pkg_reqs:R04298',
Lianhao Lua2998ff2018-08-30 14:42:29 +080091 'R-26881 = vnfsdk_pkgtools.vnfreq.pkg_reqs:R26881',
Lianhao Lu5fa8e542018-08-30 15:02:05 +080092 'R-35851 = vnfsdk_pkgtools.vnfreq.pkg_reqs:R35851',
Lianhao Lu0af46242018-08-29 18:17:46 +080093 'R-66070 = vnfsdk_pkgtools.vnfreq.pkg_reqs:R66070',
Lianhao Lu40bcf5a2018-08-30 10:24:40 +080094 'R-77707 = vnfsdk_pkgtools.vnfreq.pkg_reqs:R77707',
Lianhao Lu0af46242018-08-29 18:17:46 +080095 ],
Lianhao Lu7676ca52018-03-22 20:39:04 +080096 },
97
98 include_package_data=True,
99 install_requires=install_requires,
100 extras_require=extras_require)
101