Skip to content

Commit b4ab2a7

Browse files
committed
chore: include zstd license in distributions
1 parent 475f1c0 commit b4ab2a7

File tree

4 files changed

+21
-1
lines changed

4 files changed

+21
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ __pycache__/
33
/dist
44
/build
55
/.vscode
6-
/*.pdb
6+
/*.pdb
7+
/LICENSE_zstd

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## Unreleased
6+
7+
- Include the `zstd` library license in package distributions
8+
59
## 0.17.0 (May 10, 2025)
610

711
- Upgrade zstd source code from v1.5.6 to [v1.5.7](https://github.com/facebook/zstd/releases/tag/v1.5.7)

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ include CHANGELOG.md
33
include LICENSE
44
include README.md
55

6+
include zstd/LICENSE
67
recursive-include zstd/lib *
78
recursive-include src *
89
recursive-include tests *

setup.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,20 @@ def read_stuff():
2222
m = re.search(r'''__version__\s*=\s*(['"])(.*?)\1''', file_content)
2323
module_version = m.group(2)
2424

25+
# Create LICENSE_zstd
26+
LICENSE_ZSTD_SRC = os.path.join(ROOT_PATH, 'zstd', 'LICENSE')
27+
with open(LICENSE_ZSTD_SRC, 'r', encoding='utf-8') as file:
28+
license_zstd = file.read()
29+
LICENSE_ZSTD_DST = os.path.join(ROOT_PATH, 'LICENSE_zstd')
30+
with open(LICENSE_ZSTD_DST, 'w', encoding='utf-8') as file:
31+
file.write(
32+
"Depending on how it is build, this package may distribute the zstd library,\n"
33+
"partially or in its integrality, in source or binary form.\n\n"
34+
"Its license is reproduced below.\n\n"
35+
"---\n\n"
36+
)
37+
file.write(license_zstd)
38+
2539
return long_description, module_version
2640

2741
def get_zstd_files_list():

0 commit comments

Comments
 (0)