Debian Codegraph @

setup.py

raw
1 #
2 # Copyright (c) 2016, Arista Networks, Inc.
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions are
7 # met:
8 #
9 # Redistributions of source code must retain the above copyright notice,
10 # this list of conditions and the following disclaimer.
11 #
12 # Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # Neither the name of Arista Networks nor the names of its
17 # contributors may be used to endorse or promote products derived from
18 # this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ARISTA NETWORKS
24 # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27 # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29 # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
30 # IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 """ This module provides a RESTful API client for Cloudvision(R) Portal (CVP)
32 which can be used for building applications that work with Arista CVP.
33 """
34 import io
35 from os import path, walk
36
37 try:
38 from setuptools import setup
39 except ImportError:
40 from distutils.core import setup
41
42 from cvprac import __version__, __author__
43
44
45 def find_modules(pkg):
46 ''' Return all modules from the pkg
47 '''
48 modules = [pkg]
49 for dirname, dirnames, _ in walk(pkg):
50 for subdirname in dirnames:
51 modules.append(path.join(dirname, subdirname))
52 return modules
53
54
55 def get_long_description():
56 ''' Get the long description from README.rst if it exists.
57 Null string is returned if README.rst is non-existent
58 '''
59 long_description = ''
60 here = path.abspath(path.dirname(__file__))
61 try:
62 with io.open(path.join(here, 'README.md'), encoding='utf-8') as file_hdl:
63 long_description = file_hdl.read()
64 except IOError:
65 pass
66 return long_description
67
68
69 setup(
70 name='cvprac',
71 version=__version__,
72 description='Arista Cloudvision(R) Portal Rest API Client written in python',
73 long_description=get_long_description(),
74 long_description_content_type='text/markdown',
75 author=__author__,
76 author_email='[email protected]',
77 url='https://github.com/aristanetworks/cvprac',
78 download_url='https://github.com/aristanetworks/cvprac/tarball/%s' % __version__,
79 license='BSD-3',
80 packages=find_modules('cvprac'),
81
82 # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
83 classifiers=[
84 # How mature is this project? Common values are
85 # 3 - Alpha
86 # 4 - Beta
87 # 5 - Production/Stable
88 'Development Status :: 4 - Beta',
89
90 # Indicate who your project is intended for
91 'Intended Audience :: Developers',
92 'Intended Audience :: System Administrators',
93
94 'Topic :: Software Development :: Libraries',
95 'Topic :: Software Development :: Libraries :: Python Modules',
96 'Topic :: System :: Networking',
97
98 # Pick your license as you wish (should match "license" above)
99 'License :: OSI Approved :: BSD License',
100
101 # Specify the Python versions you support here. In particular, ensure
102 # that you indicate whether you support Python 2, Python 3 or both.
103 'Programming Language :: Python :: 3 :: Only',
104 'Programming Language :: Python :: 3.7',
105 'Programming Language :: Python :: 3.8',
106 'Programming Language :: Python :: 3.9',
107 'Programming Language :: Python :: 3.10',
108 'Programming Language :: Python :: 3.11',
109 'Programming Language :: Python :: 3.12',
110 ],
111
112 # What does your project relate to?
113 keywords='networking CloudVision development rest api',
114
115 # List run-time dependencies here. These will be installed by pip when
116 # your project is installed. For an analysis of "install_requires" vs pip's
117 # requirements files see:
118 # https://packaging.python.org/en/latest/requirements.html
119 install_requires=['requests[socks]>=2.27.0', 'packaging>=23.2'],
120
121 # List additional groups of dependencies here (e.g. development
122 # dependencies). You can install these using the following syntax,
123 # for example:
124 # $ pip install -e .[dev]
125 extras_require={
126 'dev': ['check-manifest', 'pep8', 'pyflakes', 'pylint', 'coverage',
127 'pyyaml'],
128 },
129 )