-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
74 lines (65 loc) · 2.27 KB
/
setup.py
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
74
"""Build distributions
To build `python setup.py sdist --formats=gztar bdist_wheel --universal`
"""
import os
from setuptools import setup
# import requests
# import json
# RELEASES_URL = (
# 'https://api.github.com/repos/open-traffic-generator/models/releases'
# )
# response = requests.request('GET', RELEASES_URL, allow_redirects=True)
# assert response.status_code == 200
# releases = json.loads(response.content)
# # get latest release from v0.1.x branch
# MODELS_RELEASES = [r['tag_name'] for r in releases if 'v0.1.' in r['tag_name']]
# OPENAPI_URL = (
# 'https://github.com/open-traffic-generator/models/releases/download/%s'
# '/openapi.yaml'
# ) % MODELS_RELEASES[0]
# response = requests.request('GET', OPENAPI_URL, allow_redirects=True)
# assert response.status_code == 200
# # put the downloaded file inside docs dir of package
# doc_dir = './snappi_trex/docs'
# if os.path.exists(doc_dir) is False:
# os.mkdir(doc_dir)
# with open(os.path.join(doc_dir, 'openapi.yaml'), 'wb') as fp:
# fp.write(response.content)
# read long description and version number
pkg_name = 'snappi_trex'
base_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base_dir, 'README.md')) as fid:
long_description = fid.read()
with open(os.path.join(base_dir, 'VERSION')) as fid:
version_number = fid.read()
setup(
name=pkg_name,
version=version_number,
description='The TRex Open Traffic Generator Python Package',
long_description=long_description,
long_description_content_type='text/markdown',
url='https://github.com/open-traffic-generator',
author='fredpower44',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'Topic :: Software Development :: Testing :: Traffic Generation',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3'
],
keywords='TRex testing open traffic generator automation',
packages=[pkg_name],
include_package_data=True,
python_requires='>=3, <4',
install_requires=[],
extras_require={
'dev': [
'snappi==0.3.20',
'pytest',
'flake8==3.8.4',
'dpkt==1.9.4',
]
}
)