blob: c6ba2375bcace0220f0564b8a89bd48ce3e6f826 [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*']),
81
82 entry_points={
83 'console_scripts': [
84 'vnfsdk = vnfsdk_pkgtools.cli.__main__:main'],
85 'vnfsdk.pkgtools.validator': [
86 'aria = vnfsdk_pkgtools.validator.aria_validator:AriaValidator'
87 ]
88 },
89
90 include_package_data=True,
91 install_requires=install_requires,
92 extras_require=extras_require)
93