Update sonic-py-common, add missing dependency to redis-dump-load (#14347)

Update sonic-py-common, add missing dependency to redis-dump-load.

#### Why I did it
The script sonic_db_dump_load.py in sonic-py-common is depends on redis-dump-load, however the dependency is missing.

#### How I did it
Add redis-dump-load dependency.

#### How to verify it
Pass all E2E test case.

#### Description for the changelog
Update sonic-py-common, add missing dependency to redis-dump-load.
This commit is contained in:
Hua Liu 2023-03-23 09:57:23 -07:00 committed by GitHub
parent ab097788d5
commit fb695fed6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,10 +1,31 @@
from __future__ import print_function
import sys
from setuptools import setup
import pkg_resources
from packaging import version
# sonic_dependencies, version requirement only supports '>='
sonic_dependencies = ['redis-dump-load']
dependencies = [
'natsort==6.2.1', # 6.2.1 is the last version which supports Python 2
'pyyaml',
]
dependencies += sonic_dependencies
for package in sonic_dependencies:
try:
package_dist = pkg_resources.get_distribution(package.split(">=")[0])
except pkg_resources.DistributionNotFound:
print(package + " is not found!", file=sys.stderr)
print("Please build and install SONiC python wheels dependencies from sonic-buildimage", file=sys.stderr)
exit(1)
if ">=" in package:
if version.parse(package_dist.version) >= version.parse(package.split(">=")[1]):
continue
print(package + " version not match!", file=sys.stderr)
exit(1)
setup(
name='sonic-py-common',
version='1.0',