summaryrefslogtreecommitdiffstats
path: root/ice-server/setup.py
blob: eacf0480797b7f5624b296e481495693bad47c0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/usr/bin/env python

#
# Copyright (c) 2018 Orange. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

import os
from setuptools import setup, find_packages
import sys

if sys.version_info < (3, 0):
    sys.exit('VNF SDK requires Python 3.0+')

root_dir = os.path.dirname(__file__)
install_requires = []
extras_require = {}

with open(os.path.join(root_dir, 'requirements.txt')) as requirements:
    for requirement in requirements.readlines():
        # get rid of comments or trailing comments
        requirement = requirement.split('#')[0].strip()
        if not requirement:
            continue # skip empty and comment lines
        # dependencies which use environment markers have to go in as
        # conditional dependencies under "extra_require", see more at:
        # https://wheel.readthedocs.io/en/latest/index.html#defining-conditional-dependencies
        if ';' in requirement:
            package, condition = requirement.split(';')
            cond_name = ':{0}'.format(condition.strip())
            extras_require.setdefault(cond_name, [])
            extras_require[cond_name].append(package.strip())
        else:
            install_requires.append(requirement)

setup(
    name='vnfsdk-ice-server',
    version='0.1',
    description='VNF SDK Heat validation tool',
    license='Apache License Version 2.0',
    url='http://onap.org/',

    packages=find_packages('.'),
#    packages=[
#        'heat_test',
#        'heat_test.ice_validator',
#        'heat_test.ice_validator.tests',
#        'heat_test.ice_validator.tests.utils'
#    ],

package_dir={'heat_test': 'heat_test'},
#    package_dir={
#        'heat_test': 'src/heat_test',
#        'heat_test.ice_validator': 'src/heat_test/ice_validator',
#        'heat_test.ice_validator.tests': 'src/heat_test/ice_validator/tests',
#        'heat_test.ice_validator.tests.utils': 'src/heat_test/ice_validator/tests/utils'
#    },

    include_package_data=True,
    install_requires=install_requires,
    extras_require=extras_require)