mirror of
https://github.com/Telecominfraproject/ols-nos.git
synced 2025-12-23 16:27:15 +00:00
[cfggen] Build Python 2 And Python 3 Wheel Packages
This builds Python 2&3 wheel packages for sonic-cfggen script. singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
This commit is contained in:
@@ -1,52 +1,65 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from setuptools import setup
|
||||
import os.path
|
||||
import unittest
|
||||
import glob
|
||||
|
||||
def get_test_suite():
|
||||
test_loader = unittest.TestLoader()
|
||||
test_suite = test_loader.discover('tests', pattern='*.py')
|
||||
return test_suite
|
||||
from setuptools import setup
|
||||
|
||||
from tests.common_utils import PY3x
|
||||
|
||||
dependencies = [
|
||||
# Python 2 or 3 dependencies
|
||||
'future',
|
||||
'ipaddr',
|
||||
'lxml',
|
||||
'netaddr',
|
||||
'pyyaml',
|
||||
'sonic-py-common',
|
||||
] + ([
|
||||
# Python 3 dependencies
|
||||
# pyangbind v0.8.1 pull down enum43 which causes 're' package to malfunction.
|
||||
# Python3 has enum module and so pyangbind should be installed outside
|
||||
# dependencies section of setuptools followed by uninstall of enum43
|
||||
# 'pyangbind==0.8.1',
|
||||
'Jinja2>=2.10',
|
||||
] if PY3x
|
||||
else [
|
||||
# Python 2 dependencies
|
||||
# Jinja2 v3.0.0+ dropped support for Python 2.7 and causes setuptools to
|
||||
# malfunction on stretch slave docker.
|
||||
'Jinja2<3.0.0',
|
||||
'pyangbind==0.6.0',
|
||||
])
|
||||
|
||||
setup(
|
||||
name = 'sonic-config-engine',
|
||||
version = '1.0',
|
||||
description = 'Utilities for generating SONiC configuration files',
|
||||
author='Taoyu Li',
|
||||
author_email='taoyl@microsoft.com',
|
||||
author = 'Taoyu Li',
|
||||
author_email = 'taoyl@microsoft.com',
|
||||
url = 'https://github.com/Azure/sonic-buildimage',
|
||||
py_modules = [
|
||||
'portconfig',
|
||||
'config_samples',
|
||||
'lazy_re',
|
||||
'minigraph',
|
||||
'openconfig_acl',
|
||||
'config_samples',
|
||||
'portconfig',
|
||||
'redis_bcc',
|
||||
'lazy_re',
|
||||
],
|
||||
scripts = [
|
||||
'sonic-cfggen',
|
||||
],
|
||||
install_requires = [
|
||||
'future',
|
||||
'ipaddr',
|
||||
'jinja2>=2.10',
|
||||
'lxml',
|
||||
'netaddr',
|
||||
'pyyaml',
|
||||
'pyangbind==0.6.0',
|
||||
'sonic-py-common',
|
||||
],
|
||||
test_suite = 'setup.get_test_suite',
|
||||
install_requires = dependencies,
|
||||
data_files = [
|
||||
('/usr/share/sonic/templates', glob.glob('data/*')),
|
||||
],
|
||||
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
|
||||
classifiers=[
|
||||
setup_requires= [
|
||||
'pytest-runner',
|
||||
],
|
||||
tests_require=[
|
||||
'pytest',
|
||||
],
|
||||
classifiers = [
|
||||
'Intended Audience :: Developers',
|
||||
'Natural Language :: English',
|
||||
"Programming Language :: Python :: 2",
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
@@ -54,5 +67,6 @@ setup(
|
||||
'Programming Language :: Python :: 3.7',
|
||||
'Programming Language :: Python :: 3.8',
|
||||
],
|
||||
keywords = 'SONiC sonic-cfggen config-engine PYTHON python'
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user