Skip to content

Commit e954bc4

Browse files
committed
fix(model): 修复发布模型打包的 zip 文件未压缩的问题
1 parent 87a1a66 commit e954bc4

6 files changed

Lines changed: 11 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [0.5.4](https://github.com/teambge/bge-python-sdk/compare/v0.5.3...v0.5.4) (2023-11-01)
2+
3+
4+
15
## [0.5.3](https://github.com/teambge/bge-python-sdk/compare/v0.5.2...v0.5.3) (2023-11-01)
26

37

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ install:
88

99
# 构建源码包
1010
build:
11-
python -m build
11+
$(PYTHON) setup.py bdist_wheel; \
12+
$(PYTHON) setup.py sdist
1213

1314
# 单元测试
1415
test:

bgesdk/management/commands/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,7 @@ def _zip_codedir(self, home, ziph):
859859
continue
860860
zipinfo = zipfile.ZipInfo(zip_relpath)
861861
zipinfo.external_attr = 0o755 << 16
862+
zipinfo.compress_type = ZIP_COMPRESSION
862863
with open(filepath, 'rb') as f:
863864
ziph.writestr(zipinfo, f.read())
864865
output('\t{}'.format(zip_relpath))
@@ -869,6 +870,7 @@ def _zip_codedir(self, home, ziph):
869870
content = python_minifier.minify(content)
870871
zipinfo = zipfile.ZipInfo(zip_relpath)
871872
zipinfo.external_attr = 0o755 << 16
873+
zipinfo.compress_type = ZIP_COMPRESSION
872874
ziph.writestr(zipinfo, content)
873875
output('\t{} [green]MINIFIED[/green]'.format(zip_relpath))
874876

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bge-python-sdk",
3-
"version": "0.5.3",
3+
"version": "0.5.4",
44
"scripts": {
55
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
66
"init_changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = bge-python-sdk
3-
version = 0.5.3
3+
version = 0.5.4
44
description = 可用于调用 BGE 开放平台的相关接口。
55
long_description = file: README.md
66
long_description_content_type = text/markdown

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
sonar.projectName=bge-python-sdk
2-
sonar.projectVersion=0.5.3
2+
sonar.projectVersion=0.5.4
33
sonar.host.url=https://sonarqube.omgut.com
44
sonar.projectKey=bge_bge-python-sdk_AX6jmT2y6I6LwTlVf_Z1
55
sonar.links.homepage=https://github.com/teambge/bge-python-sdk

0 commit comments

Comments
 (0)