blob: 7615d29a4e6544778aebfb1fa56c98dd3f0b1b64 [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
Lianhao Lu89649fc2018-07-27 13:28:48 +080050extras_require['aria'] = 'apache-ariatosca==0.1.1'
51
Lianhao Lu7676ca52018-03-22 20:39:04 +080052version = { }
53with open(os.path.join(root_dir, 'vnfsdk_pkgtools/version.py')) as fp:
54 exec(fp.read(), version)
55
56setup(
57 name='vnfsdk',
58 version=version['__version__'],
59 description='VNFSDK CSAR package tool',
60 long_description="VNFSDK CSAR package tool in ONAP",
61 license='Apache License Version 2.0',
62
63 author='ONAP',
64
65 url='https://git.onap.org/vnfsdk/pkgtools',
66
67 classifiers=[
68 'Development Status :: 4 - Beta',
69 'Environment :: Console',
70 'Environment :: Web Environment',
71 'Intended Audience :: Developers',
72 'Intended Audience :: System Administrators',
73 'License :: OSI Approved :: Apache Software License',
74 'Operating System :: OS Independent',
75 'Programming Language :: Python',
76 'Programming Language :: Python :: 2',
77 'Programming Language :: Python :: 2.7',
78 'Topic :: Software Development :: Libraries :: Python Modules',
79 'Topic :: System :: Networking',
80 'Topic :: System :: Systems Administration'],
81
82 packages=find_packages(exclude=['tests*']),
83
84 entry_points={
85 'console_scripts': [
86 'vnfsdk = vnfsdk_pkgtools.cli.__main__:main'],
87 'vnfsdk.pkgtools.validator': [
Lianhao Lu89649fc2018-07-27 13:28:48 +080088 'aria = vnfsdk_pkgtools.validator.aria_validator:AriaValidator [aria]'
Lianhao Lu7676ca52018-03-22 20:39:04 +080089 ]
90 },
91
92 include_package_data=True,
93 install_requires=install_requires,
94 extras_require=extras_require)
95