Skip to content

Commit 758ecdc

Browse files
authored
Revert "Dev (#23)"
This reverts commit 2ed4e15.
1 parent 2ed4e15 commit 758ecdc

3 files changed

Lines changed: 5 additions & 44 deletions

File tree

.github/workflows/dev_package_and_upload.yml

Lines changed: 3 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,8 @@ on:
99
- 'package/nuitka_config.yml'
1010

1111
jobs:
12-
package-and-release:
12+
package-and-upload:
1313
runs-on: windows-latest
14-
env:
15-
PYTHON_VERSION: 3.10
16-
NUITKA_CACHE_DIR: ${{ github.workspace }}/nuitka-cache
1714

1815
# 添加必要的权限
1916
permissions:
@@ -26,42 +23,17 @@ jobs:
2623

2724
- name: Checkout code
2825
uses: actions/checkout@v4
29-
30-
3126

3227
- name: Set up Python
3328
uses: actions/setup-python@v5
3429
with:
35-
python-version: ${{ env.PYTHON_VERSION }}
36-
37-
- name: Cache UPX
38-
id: cache-upx
39-
uses: actions/cache@v4
40-
with:
41-
path: upx
42-
key: ${{ runner.os }}-${{ runner.arch }}-upx-v5.0.1
43-
restore-keys: |
44-
${{ runner.os }}-${{ runner.arch }}-upx-
45-
30+
python-version: '3.10'
31+
4632
- name: UPX Setup
47-
if: ${{ steps.cache-upx.outputs.cache-hit != 'true' }
4833
run: |
4934
mkdir upx
5035
curl -o upx/upx.exe https://assets.ksable.top/github/upx/upx/v5.0.1/windows-amd64/upx.exe
5136
52-
- name: get pip cache dir
53-
id: pip-cache-dir
54-
run: echo "pip-cache-dir=$(pip cache dir)" >> $env:GITHUB_OUTPUT
55-
56-
- name: pip cache
57-
uses: actions/cache@v4
58-
with:
59-
path: ${{ steps.pip-cache-dir.outputs.dir }} # pip缓存路径
60-
key: ${{ runner.os }}-${{ runner.arch }}-pip-${{ hashFiles('package/nuitka_build.py') }}
61-
restore-keys: |
62-
${{ runner.os }}-${{ runner.arch }}-pip- # 后备恢复键(当精确键不存在时,使用最近的缓存)
63-
64-
6537
- name: Install dependencies
6638
run: |
6739
python -m pip install --upgrade pip
@@ -81,15 +53,6 @@ jobs:
8153
# # 设置控制台编码为UTF-8
8254
# chcp.com 65001
8355

84-
- name: Cache Nuitka cache directory
85-
uses: actions/cache@v4
86-
with:
87-
path: ${{ env.NUITKA_CACHE_DIR }}
88-
key: nuitka-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-nuitka-${{ hashFiles('package/nuitka_build.py') }}
89-
restore-keys: |
90-
nuitka-${{ runner.os }}-${{ runner.arch }}-python-${{ env.PYTHON_VERSION }}-
91-
nuitka-${{ runner.os }}-${{ runner.arch }}-
92-
9356
- name: Run packaging script
9457
run: |
9558
# 设置Python使用UTF-8编码

novel_crawler/novel_crawler_v.25.07.08.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ def download_chapter(chapter_info, progress, task_id, chapter_count):
417417

418418
# 主函数开始
419419
def main():
420-
print_header("小说爬虫工具")
420+
print_header("小说爬虫工具\n版本 v.25.07.07")
421421

422422
if debug:
423423
logger.debug("Debug模式已开启")

package/nuitka_build.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ def main():
2626

2727
print(f"当前操作系统: {Machine} {arrch}")
2828
print(f"平台详情: {platform.platform()}")
29-
print("CPU核心数:", os.cpu_count())
3029
print(f"Python版本: {sys.version}")
3130

3231
# 解析命令行参数
3332
parser = argparse.ArgumentParser(description='Nuitka打包脚本')
3433
parser.add_argument('config', help='配置文件路径')
3534
args = parser.parse_args()
36-
cpu_count=os.cpu_count()
35+
3736
# 读取配置文件
3837
with open(args.config, 'r', encoding='utf-8') as f:
3938
config = yaml.safe_load(f)
@@ -93,7 +92,6 @@ def main():
9392
'--onefile', # 单文件
9493
'--standalone',
9594
'--mingw64',
96-
f'--jobs={os.cpu_count()}', # 多线程
9795
# '--mode',
9896
'--assume-yes-for-downloads', #自动下载外部代码
9997
# '--show-memory'

0 commit comments

Comments
 (0)