support zstd

This commit is contained in:
dave 2023-05-27 17:36:19 -07:00
parent 1c57c0332e
commit a1c0212e09
2 changed files with 5 additions and 2 deletions

View File

@ -15,6 +15,7 @@ import tarfile
from collections import defaultdict
from gzip import GzipFile
import lzma
import pyzstd
from email import message_from_string, message_from_file
from functools import cmp_to_key
@ -28,7 +29,8 @@ REQUIRED_HEADERS = ('package', 'version', 'architecture')
control_openers = {
'gz': lambda fob: GzipFile(fileobj=fob),
'xz': lambda fob: lzma.open(fob, "r")
'xz': lambda fob: lzma.open(fob, "r"),
'zst': lambda fob: pyzstd.open(fob, "r")
}

View File

@ -17,7 +17,8 @@ setup(
setup_requires=[
'arpy==1.1.1',
'six>=1.10.0',
'PGPy==0.4.1'
'PGPy==0.6.0',
'pyzstd>=0.15.7'
],
extras_require={
'test': ['pep8==1.7.0', 'pytest==3.1.1', 'pylint==1.7.1']