equal
deleted
inserted
replaced
17 'common/xxhash.c', |
17 'common/xxhash.c', |
18 'common/zstd_common.c', |
18 'common/zstd_common.c', |
19 'compress/fse_compress.c', |
19 'compress/fse_compress.c', |
20 'compress/huf_compress.c', |
20 'compress/huf_compress.c', |
21 'compress/zstd_compress.c', |
21 'compress/zstd_compress.c', |
|
22 'compress/zstdmt_compress.c', |
22 'decompress/huf_decompress.c', |
23 'decompress/huf_decompress.c', |
23 'decompress/zstd_decompress.c', |
24 'decompress/zstd_decompress.c', |
24 'dictBuilder/cover.c', |
25 'dictBuilder/cover.c', |
25 'dictBuilder/divsufsort.c', |
26 'dictBuilder/divsufsort.c', |
26 'dictBuilder/zdict.c', |
27 'dictBuilder/zdict.c', |
53 'zstd/legacy', |
54 'zstd/legacy', |
54 ] |
55 ] |
55 |
56 |
56 ext_sources = [ |
57 ext_sources = [ |
57 'zstd.c', |
58 'zstd.c', |
|
59 'c-ext/bufferutil.c', |
58 'c-ext/compressiondict.c', |
60 'c-ext/compressiondict.c', |
59 'c-ext/compressobj.c', |
61 'c-ext/compressobj.c', |
60 'c-ext/compressor.c', |
62 'c-ext/compressor.c', |
61 'c-ext/compressoriterator.c', |
63 'c-ext/compressoriterator.c', |
62 'c-ext/compressionparams.c', |
64 'c-ext/compressionparams.c', |
64 'c-ext/constants.c', |
66 'c-ext/constants.c', |
65 'c-ext/decompressobj.c', |
67 'c-ext/decompressobj.c', |
66 'c-ext/decompressor.c', |
68 'c-ext/decompressor.c', |
67 'c-ext/decompressoriterator.c', |
69 'c-ext/decompressoriterator.c', |
68 'c-ext/decompressionwriter.c', |
70 'c-ext/decompressionwriter.c', |
69 'c-ext/dictparams.c', |
|
70 'c-ext/frameparams.c', |
71 'c-ext/frameparams.c', |
71 ] |
72 ] |
72 |
73 |
73 zstd_depends = [ |
74 zstd_depends = [ |
74 'c-ext/python-zstandard.h', |
75 'c-ext/python-zstandard.h', |
87 if support_legacy: |
88 if support_legacy: |
88 include_dirs.extend([os.path.join(root, d) for d in zstd_includes_legacy]) |
89 include_dirs.extend([os.path.join(root, d) for d in zstd_includes_legacy]) |
89 |
90 |
90 depends = [os.path.join(root, p) for p in zstd_depends] |
91 depends = [os.path.join(root, p) for p in zstd_depends] |
91 |
92 |
|
93 extra_args = ['-DZSTD_MULTITHREAD'] |
|
94 |
|
95 if support_legacy: |
|
96 extra_args.append('-DZSTD_LEGACY_SUPPORT=1') |
|
97 |
92 # TODO compile with optimizations. |
98 # TODO compile with optimizations. |
93 return Extension(name, sources, |
99 return Extension(name, sources, |
94 include_dirs=include_dirs, |
100 include_dirs=include_dirs, |
95 depends=depends, |
101 depends=depends, |
96 extra_compile_args=["-DZSTD_LEGACY_SUPPORT=1"] if support_legacy else []) |
102 extra_compile_args=extra_args) |