Skip to content

Commit 30fccb1

Browse files
author
Sergey Dryabzhinsky
committed
For issue #73 - update libzstd to 1.5.1
1 parent 43c7918 commit 30fccb1

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

PKG-INFO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
Metadata-Version: 1.1
22
Name: zstd
3-
Version: 1.5.0.4
3+
Version: 1.5.1.0
44
Summary: Simple python bindings to Yann Collet ZSTD compression library
55
Home-page: https://github.com/sergey-dryabzhinsky/python-zstd
66
Author: Sergey Dryabzhinsky
77
Author-email: [email protected]
88
License: BSD
9-
Download-URL: https://github.com/sergey-dryabzhinsky/python-zstd/archive/v1.5.0.4.tar.gz
9+
Download-URL: https://github.com/sergey-dryabzhinsky/python-zstd/archive/v1.5.1.0.tar.gz
1010
Description: Simple ZSTandarD bindings for Python
1111
Keywords: zstd,zstandard,compression
1212
Platform: POSIX

README.rst

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ python-zstd
55
.. image:: https://travis-ci.org/sergey-dryabzhinsky/python-zstd.svg?branch=master
66
:target: https://travis-ci.org/sergey-dryabzhinsky/python-zstd
77

8-
Simple python bindings to Yann Collet ZSTD compression library
8+
Simple python bindings to Yann Collet ZSTD compression library.
99

1010
**Zstd**, short for Zstandard, is a new lossless compression algorithm,
1111
which provides both good compression ratio *and* speed for your standard compression needs.
@@ -62,18 +62,19 @@ Build from source
6262
>>> $ python setup.py build_ext clean
6363
>>> $ python3 setup.py build_ext clean
6464

65-
Note: legacy format support disabled by default.
65+
Note: Zstd legacy format support disabled by default.
6666
To build with Zstd legacy versions support - pass ``--legacy`` option to setup.py script:
6767

6868
>>> $ python setup.py build_ext --legacy clean
6969

70-
Note: PyZstd legacy format support disabled by default.
70+
Note: Python-Zstd legacy format support removed since 1.5.0.
71+
If you need to convert old data - checkout 1.4.9.1 module version. Support of it disabled by default.
7172
To build with python-zstd legacy format support (pre 1.1.2) - pass ``--pyzstd-legacy`` option to setup.py script:
7273

7374
>>> $ python setup.py build_ext --pyzstd-legacy clean
7475

7576
If you want to build with existing distribution of libzstd just add ``--external`` option.
76-
But beware! Legacy formats support is unknown in this case.
77+
But beware! Legacy formats support state is unknown in this case.
7778
And if your version not equal with python-zstd - tests may not pass.
7879

7980
>>> $ python setup.py build_ext --external clean
@@ -126,6 +127,9 @@ ZSTD_uncompress (data): string|bytes
126127
version (): string|bytes
127128
Returns this module doted version string.
128129

130+
The first three digits are folow libzstd version.
131+
Fourth digit - module release number for that version.
132+
129133
Since: 1.3.4.3
130134

131135
ZSTD_version (): string|bytes
@@ -183,11 +187,11 @@ Module has simple API:
183187
>>> dir(zstd)
184188
['Error', 'ZSTD_compress', 'ZSTD_external', 'ZSTD_uncompress', 'ZSTD_version', 'ZSTD_version_number', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__', 'compress', 'decompress', 'dumps', 'loads', 'uncompress', 'version']
185189
>>> zstd.version()
186-
'1.5.0.4'
190+
'1.5.1.0'
187191
>>> zstd.ZSTD_version()
188-
'1.5.0'
192+
'1.5.1'
189193
>>> zstd.ZSTD_version_number()
190-
10500
194+
10501
191195
>>> zstd.ZSTD_external()
192196
0
193197

setup.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@
88
from setuptools.command.build_ext import build_ext
99

1010
# ZSTD version
11-
VERSION = (1, 5, 0,)
11+
VERSION = (1, 5, 1,)
1212
VERSION_STR = ".".join([str(x) for x in VERSION])
1313

1414
# Package version
1515
PKG_VERSION = VERSION
1616
# Minor versions
17-
PKG_VERSION += ("4",)
17+
PKG_VERSION += ("0",)
1818
PKG_VERSION_STR = ".".join([str(x) for x in PKG_VERSION])
1919

2020
###
@@ -60,12 +60,16 @@
6060
ext_libraries=["zstd"]
6161

6262

63+
###
64+
# DVERSION - pass module version string
65+
# DDYNAMIC_BMI2 - disable BMI2 amd64 asembler code - can't build it, use CFLAGS with -march= bdver4, znver1/2/3, native
66+
#
6367
COPT = {
64-
'msvc': [ '/Ox', '/DVERSION=%s' % PKG_VERSION_STR, ],
65-
'mingw32': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, ],
66-
'unix': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, ],
67-
'clang': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, ],
68-
'gcc': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, ]
68+
'msvc': [ '/Ox', '/DVERSION=%s' % PKG_VERSION_STR, '/DDYNAMIC_BMI2=0' ],
69+
'mingw32': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, '-DDYNAMIC_BMI2=0' ],
70+
'unix': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, '-DDYNAMIC_BMI2=0' ],
71+
'clang': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, '-DDYNAMIC_BMI2=0' ],
72+
'gcc': [ '-O2', '-DVERSION=%s' % PKG_VERSION_STR, '-DDYNAMIC_BMI2=0' ]
6973
}
7074

7175
if not SUP_EXTERNAL:
@@ -128,8 +132,13 @@ def build_extensions(self):
128132
'compress/zstd_compress_sequences.c',
129133
'compress/zstd_compress_superblock.c',
130134
'compress/zstdmt_compress.c',
131-
'compress/zstd_fast.c', 'compress/zstd_double_fast.c', 'compress/zstd_lazy.c', 'compress/zstd_opt.c', 'compress/zstd_ldm.c',
132-
'compress/fse_compress.c', 'compress/huf_compress.c',
135+
'compress/zstd_fast.c',
136+
'compress/zstd_double_fast.c',
137+
'compress/zstd_lazy.c',
138+
'compress/zstd_opt.c',
139+
'compress/zstd_ldm.c',
140+
'compress/fse_compress.c',
141+
'compress/huf_compress.c',
133142
'compress/hist.c',
134143

135144
'common/fse_decompress.c',
@@ -140,7 +149,8 @@ def build_extensions(self):
140149

141150
'common/entropy_common.c',
142151
'common/zstd_common.c',
143-
'common/xxhash.c', 'common/error_private.c',
152+
'common/xxhash.c',
153+
'common/error_private.c',
144154
'common/pool.c',
145155
'common/threading.c',
146156
]:

tests/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ def raise_skip(msg):
4040

4141
class BaseTestZSTD(unittest.TestCase):
4242

43-
VERSION = "1.5.0"
44-
VERSION_INT = 10500
43+
VERSION = "1.5.1"
44+
VERSION_INT = 10501
4545
VERSION_INT_MIN = 1 * 100*100 + 0 * 1*100 + 0
46-
PKG_VERSION = "1.5.0.4"
46+
PKG_VERSION = "1.5.1.0"
4747

4848
def helper_version(self):
4949
self.assertEqual(self.PKG_VERSION, zstd.version())

zstd

Submodule zstd updated 154 files

0 commit comments

Comments
 (0)