frp-tunnel 1.0.5__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/.gitignore +17 -4
- {frp_tunnel-1.0.5/frp_tunnel.egg-info → frp_tunnel-1.0.6}/PKG-INFO +1 -1
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6/frp_tunnel.egg-info}/PKG-INFO +1 -1
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel.egg-info/SOURCES.txt +1 -1
- frp_tunnel-1.0.6/publish.bat +153 -0
- frp_tunnel-1.0.6/publish.sh +170 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/pyproject.toml +1 -1
- frp_tunnel-1.0.5/publish.bat +0 -43
- frp_tunnel-1.0.5/publish.py +0 -68
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/.github/workflows/ci.yml +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/.github/workflows/publish.yml +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/CHANGELOG.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/CONTRIBUTING.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/GITHUB_SECRETS.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/LICENSE +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/PUBLISHING.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/QUICKSTART.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/README.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/README_CN.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/ROADMAP.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/SECURITY.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/SKILL_SHOWCASE.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/config/frpc.ini +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/config/frps.ini +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/config/ssh-config-template +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/docs/CONFIGURATION.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/docs/INSTALLATION.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/docs/TROUBLESHOOTING.md +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/examples/automation-example.sh +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/examples/colab-example.ipynb +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/__init__.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/_version.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/cli.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/core/__init__.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/core/config.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/core/installer.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/core/platform.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel/core/tunnel.py +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel.egg-info/dependency_links.txt +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel.egg-info/entry_points.txt +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel.egg-info/requires.txt +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/frp_tunnel.egg-info/top_level.txt +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/scripts/frp-client-colab.sh +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/scripts/frp-client-linux.sh +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/scripts/frp-client-windows.ps1 +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/scripts/frp-server-gcp.sh +0 -0
- {frp_tunnel-1.0.5 → frp_tunnel-1.0.6}/setup.cfg +0 -0
|
@@ -80,6 +80,7 @@ venv/
|
|
|
80
80
|
ENV/
|
|
81
81
|
env.bak/
|
|
82
82
|
venv.bak/
|
|
83
|
+
build_env/
|
|
83
84
|
|
|
84
85
|
# Spyder project settings
|
|
85
86
|
.spyderproject
|
|
@@ -99,6 +100,9 @@ dmypy.json
|
|
|
99
100
|
# Pyre type checker
|
|
100
101
|
.pyre/
|
|
101
102
|
|
|
103
|
+
# PyPI credentials
|
|
104
|
+
.pypirc
|
|
105
|
+
|
|
102
106
|
# FRP specific
|
|
103
107
|
*.log
|
|
104
108
|
*.pid
|
|
@@ -116,11 +120,20 @@ config/local_*
|
|
|
116
120
|
.idea/
|
|
117
121
|
*.swp
|
|
118
122
|
*.swo
|
|
123
|
+
*~
|
|
119
124
|
|
|
120
|
-
#
|
|
125
|
+
# OS
|
|
121
126
|
.DS_Store
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
127
|
+
.DS_Store?
|
|
128
|
+
._*
|
|
129
|
+
.Spotlight-V100
|
|
130
|
+
.Trashes
|
|
125
131
|
ehthumbs.db
|
|
132
|
+
Thumbs.db
|
|
126
133
|
Desktop.ini
|
|
134
|
+
|
|
135
|
+
# Temporary files
|
|
136
|
+
*.tmp
|
|
137
|
+
*.temp
|
|
138
|
+
.tmp/
|
|
139
|
+
.temp/
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
REM 一键发布到 PyPI 脚本 (Windows)
|
|
3
|
+
echo 🚀 一键发布 frp-tunnel 到 PyPI
|
|
4
|
+
echo ==============================
|
|
5
|
+
|
|
6
|
+
REM 检查是否在正确目录
|
|
7
|
+
if not exist "pyproject.toml" (
|
|
8
|
+
echo ❌ 错误: 未找到 pyproject.toml,请在项目根目录运行
|
|
9
|
+
exit /b 1
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
REM 检查是否在 GitHub Actions 环境
|
|
13
|
+
if defined GITHUB_ACTIONS (
|
|
14
|
+
echo 🤖 检测到 GitHub Actions 环境
|
|
15
|
+
if not defined PYPI_API_TOKEN (
|
|
16
|
+
echo ❌ GitHub Actions 需要设置 PYPI_API_TOKEN secret
|
|
17
|
+
exit /b 1
|
|
18
|
+
)
|
|
19
|
+
if not defined TEST_PYPI_API_TOKEN (
|
|
20
|
+
echo ❌ GitHub Actions 需要设置 TEST_PYPI_API_TOKEN secret
|
|
21
|
+
exit /b 1
|
|
22
|
+
)
|
|
23
|
+
) else (
|
|
24
|
+
echo 💻 本地环境 - 需要输入令牌
|
|
25
|
+
|
|
26
|
+
REM 检查是否有 PyPI 令牌
|
|
27
|
+
if not exist "%USERPROFILE%\.pypirc" (
|
|
28
|
+
echo.
|
|
29
|
+
echo 📝 需要设置 PyPI 令牌
|
|
30
|
+
set /p TEST_PYPI_TOKEN="请输入你的 TestPyPI API 令牌 (以 pypi- 开头): "
|
|
31
|
+
set /p PYPI_TOKEN="请输入你的 PyPI API 令牌 (以 pypi- 开头): "
|
|
32
|
+
|
|
33
|
+
echo [distutils] > "%USERPROFILE%\.pypirc"
|
|
34
|
+
echo index-servers = >> "%USERPROFILE%\.pypirc"
|
|
35
|
+
echo pypi >> "%USERPROFILE%\.pypirc"
|
|
36
|
+
echo testpypi >> "%USERPROFILE%\.pypirc"
|
|
37
|
+
echo. >> "%USERPROFILE%\.pypirc"
|
|
38
|
+
echo [pypi] >> "%USERPROFILE%\.pypirc"
|
|
39
|
+
echo repository = https://upload.pypi.org/legacy/ >> "%USERPROFILE%\.pypirc"
|
|
40
|
+
echo username = __token__ >> "%USERPROFILE%\.pypirc"
|
|
41
|
+
echo password = %PYPI_TOKEN% >> "%USERPROFILE%\.pypirc"
|
|
42
|
+
echo. >> "%USERPROFILE%\.pypirc"
|
|
43
|
+
echo [testpypi] >> "%USERPROFILE%\.pypirc"
|
|
44
|
+
echo repository = https://test.pypi.org/legacy/ >> "%USERPROFILE%\.pypirc"
|
|
45
|
+
echo username = __token__ >> "%USERPROFILE%\.pypirc"
|
|
46
|
+
echo password = %TEST_PYPI_TOKEN% >> "%USERPROFILE%\.pypirc"
|
|
47
|
+
|
|
48
|
+
echo ✅ PyPI 令牌已保存
|
|
49
|
+
|
|
50
|
+
REM 设置 GitHub secrets
|
|
51
|
+
echo.
|
|
52
|
+
echo 🔐 设置 GitHub secrets...
|
|
53
|
+
where gh >nul 2>&1
|
|
54
|
+
if %errorlevel% equ 0 (
|
|
55
|
+
echo %PYPI_TOKEN% | gh secret set PYPI_API_TOKEN
|
|
56
|
+
echo %TEST_PYPI_TOKEN% | gh secret set TEST_PYPI_API_TOKEN
|
|
57
|
+
echo ✅ GitHub secrets 已设置
|
|
58
|
+
) else (
|
|
59
|
+
echo ⚠️ 未找到 gh CLI,请手动设置 GitHub secrets:
|
|
60
|
+
echo - PYPI_API_TOKEN
|
|
61
|
+
echo - TEST_PYPI_API_TOKEN
|
|
62
|
+
echo 在: https://github.com/cicy-dev/frp-tunnel/settings/secrets/actions
|
|
63
|
+
)
|
|
64
|
+
) else (
|
|
65
|
+
echo ✅ 找到现有的 PyPI 配置
|
|
66
|
+
)
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
REM 安装构建依赖
|
|
70
|
+
echo.
|
|
71
|
+
echo 📦 安装构建依赖...
|
|
72
|
+
pip install --upgrade build twine
|
|
73
|
+
|
|
74
|
+
REM 清理旧构建
|
|
75
|
+
echo.
|
|
76
|
+
echo 🧹 清理旧构建...
|
|
77
|
+
if exist "dist" rmdir /s /q dist
|
|
78
|
+
if exist "build" rmdir /s /q build
|
|
79
|
+
|
|
80
|
+
REM 构建包
|
|
81
|
+
echo.
|
|
82
|
+
echo 📦 构建包...
|
|
83
|
+
python -m build
|
|
84
|
+
|
|
85
|
+
REM 显示构建的包
|
|
86
|
+
echo.
|
|
87
|
+
echo 📋 构建的包:
|
|
88
|
+
dir dist
|
|
89
|
+
|
|
90
|
+
REM 本地环境:先发布到 TestPyPI 测试
|
|
91
|
+
if not defined GITHUB_ACTIONS (
|
|
92
|
+
echo.
|
|
93
|
+
echo 🧪 本地环境 - 先发布到 TestPyPI 测试...
|
|
94
|
+
twine upload --repository testpypi dist/*
|
|
95
|
+
|
|
96
|
+
if %errorlevel% equ 0 (
|
|
97
|
+
echo ✅ TestPyPI 发布成功!
|
|
98
|
+
echo.
|
|
99
|
+
echo 🔍 测试 TestPyPI 安装...
|
|
100
|
+
echo ⏳ 等待 TestPyPI 更新...
|
|
101
|
+
timeout /t 15 /nobreak >nul
|
|
102
|
+
|
|
103
|
+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ frp-tunnel --upgrade
|
|
104
|
+
|
|
105
|
+
echo 🔍 测试命令...
|
|
106
|
+
frp-tunnel --version
|
|
107
|
+
|
|
108
|
+
echo.
|
|
109
|
+
echo ✅ TestPyPI 测试通过!
|
|
110
|
+
echo.
|
|
111
|
+
set /p continue_pypi="TestPyPI 测试成功,是否继续发布到正式 PyPI? (y/n): "
|
|
112
|
+
|
|
113
|
+
if not "%continue_pypi%"=="y" (
|
|
114
|
+
echo 🛑 用户取消发布到正式 PyPI
|
|
115
|
+
exit /b 0
|
|
116
|
+
)
|
|
117
|
+
) else (
|
|
118
|
+
echo ❌ TestPyPI 发布失败
|
|
119
|
+
exit /b 1
|
|
120
|
+
)
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
REM 发布到正式 PyPI
|
|
124
|
+
echo.
|
|
125
|
+
echo 🚀 发布到正式 PyPI...
|
|
126
|
+
twine upload dist/*
|
|
127
|
+
|
|
128
|
+
if %errorlevel% equ 0 (
|
|
129
|
+
echo.
|
|
130
|
+
echo ✅ 成功发布到 PyPI!
|
|
131
|
+
|
|
132
|
+
REM 测试正式 PyPI 安装
|
|
133
|
+
echo.
|
|
134
|
+
echo 🧪 测试正式 PyPI 安装...
|
|
135
|
+
echo ⏳ 等待 PyPI 更新...
|
|
136
|
+
timeout /t 10 /nobreak >nul
|
|
137
|
+
pip install frp-tunnel --upgrade
|
|
138
|
+
|
|
139
|
+
echo.
|
|
140
|
+
echo 🔍 测试命令...
|
|
141
|
+
frp-tunnel --version
|
|
142
|
+
|
|
143
|
+
echo.
|
|
144
|
+
echo 🎉 发布和测试完成!
|
|
145
|
+
echo 📦 包地址: https://pypi.org/project/frp-tunnel/
|
|
146
|
+
echo.
|
|
147
|
+
echo 用户现在可以使用:
|
|
148
|
+
echo pip install frp-tunnel
|
|
149
|
+
echo frp-tunnel --help
|
|
150
|
+
) else (
|
|
151
|
+
echo ❌ PyPI 发布失败
|
|
152
|
+
exit /b 1
|
|
153
|
+
)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# 一键发布到 PyPI 脚本
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🚀 一键发布 frp-tunnel 到 PyPI"
|
|
7
|
+
echo "=============================="
|
|
8
|
+
|
|
9
|
+
cd /home/w3c_offical/projects/frp-tunnel
|
|
10
|
+
|
|
11
|
+
# 检查是否在 GitHub Actions 环境
|
|
12
|
+
if [ -n "$GITHUB_ACTIONS" ]; then
|
|
13
|
+
echo "🤖 检测到 GitHub Actions 环境"
|
|
14
|
+
# GitHub Actions 使用 secrets,不需要手动输入
|
|
15
|
+
if [ -z "$PYPI_API_TOKEN" ] || [ -z "$TEST_PYPI_API_TOKEN" ]; then
|
|
16
|
+
echo "❌ GitHub Actions 需要设置 PYPI_API_TOKEN 和 TEST_PYPI_API_TOKEN secrets"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
else
|
|
20
|
+
echo "💻 本地环境 - 需要输入令牌"
|
|
21
|
+
|
|
22
|
+
# 检查是否有令牌文件
|
|
23
|
+
if [ ! -f ~/.pypirc ] || ! grep -q "password" ~/.pypirc 2>/dev/null; then
|
|
24
|
+
echo ""
|
|
25
|
+
echo "📝 需要设置 PyPI 令牌"
|
|
26
|
+
echo "请输入你的 TestPyPI API 令牌 (以 pypi- 开头):"
|
|
27
|
+
read -s TEST_PYPI_TOKEN
|
|
28
|
+
|
|
29
|
+
echo "请输入你的 PyPI API 令牌 (以 pypi- 开头):"
|
|
30
|
+
read -s PYPI_TOKEN
|
|
31
|
+
|
|
32
|
+
cat > ~/.pypirc << EOF
|
|
33
|
+
[distutils]
|
|
34
|
+
index-servers =
|
|
35
|
+
pypi
|
|
36
|
+
testpypi
|
|
37
|
+
|
|
38
|
+
[pypi]
|
|
39
|
+
repository = https://upload.pypi.org/legacy/
|
|
40
|
+
username = __token__
|
|
41
|
+
password = $PYPI_TOKEN
|
|
42
|
+
|
|
43
|
+
[testpypi]
|
|
44
|
+
repository = https://test.pypi.org/legacy/
|
|
45
|
+
username = __token__
|
|
46
|
+
password = $TEST_PYPI_TOKEN
|
|
47
|
+
EOF
|
|
48
|
+
chmod 600 ~/.pypirc
|
|
49
|
+
echo "✅ PyPI 令牌已保存"
|
|
50
|
+
|
|
51
|
+
# 设置 GitHub secrets
|
|
52
|
+
echo ""
|
|
53
|
+
echo "🔐 设置 GitHub secrets..."
|
|
54
|
+
if command -v gh >/dev/null 2>&1; then
|
|
55
|
+
echo "$PYPI_TOKEN" | gh secret set PYPI_API_TOKEN
|
|
56
|
+
echo "$TEST_PYPI_TOKEN" | gh secret set TEST_PYPI_API_TOKEN
|
|
57
|
+
echo "✅ GitHub secrets 已设置"
|
|
58
|
+
else
|
|
59
|
+
echo "⚠️ 未找到 gh CLI,请手动设置 GitHub secrets:"
|
|
60
|
+
echo " - PYPI_API_TOKEN"
|
|
61
|
+
echo " - TEST_PYPI_API_TOKEN"
|
|
62
|
+
echo " 在: https://github.com/cicy-dev/frp-tunnel/settings/secrets/actions"
|
|
63
|
+
fi
|
|
64
|
+
else
|
|
65
|
+
echo "✅ 找到现有的 PyPI 配置"
|
|
66
|
+
fi
|
|
67
|
+
fi
|
|
68
|
+
|
|
69
|
+
# 构建包
|
|
70
|
+
echo ""
|
|
71
|
+
echo "📦 构建包..."
|
|
72
|
+
rm -rf dist/*
|
|
73
|
+
source build_env/bin/activate
|
|
74
|
+
python -m build
|
|
75
|
+
|
|
76
|
+
echo ""
|
|
77
|
+
echo "📋 构建的包:"
|
|
78
|
+
ls -la dist/
|
|
79
|
+
|
|
80
|
+
# 本地环境:先发布到 TestPyPI 测试
|
|
81
|
+
if [ -z "$GITHUB_ACTIONS" ]; then
|
|
82
|
+
echo ""
|
|
83
|
+
echo "🧪 本地环境 - 先发布到 TestPyPI 测试..."
|
|
84
|
+
twine upload --repository testpypi dist/*
|
|
85
|
+
|
|
86
|
+
if [ $? -eq 0 ]; then
|
|
87
|
+
echo "✅ TestPyPI 发布成功!"
|
|
88
|
+
echo ""
|
|
89
|
+
echo "🔍 测试 TestPyPI 安装..."
|
|
90
|
+
|
|
91
|
+
# 创建临时测试环境
|
|
92
|
+
TEST_ENV="/tmp/frp_test_$$"
|
|
93
|
+
python3 -m venv "$TEST_ENV"
|
|
94
|
+
source "$TEST_ENV/bin/activate"
|
|
95
|
+
|
|
96
|
+
# 等待 TestPyPI 更新
|
|
97
|
+
echo "⏳ 等待 TestPyPI 更新..."
|
|
98
|
+
sleep 15
|
|
99
|
+
|
|
100
|
+
# 从 TestPyPI 安装测试
|
|
101
|
+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ frp-tunnel --upgrade
|
|
102
|
+
|
|
103
|
+
echo "🔍 测试命令..."
|
|
104
|
+
frp-tunnel --version
|
|
105
|
+
frp-tunnel --help | head -5
|
|
106
|
+
|
|
107
|
+
# 清理测试环境
|
|
108
|
+
deactivate
|
|
109
|
+
rm -rf "$TEST_ENV"
|
|
110
|
+
|
|
111
|
+
echo ""
|
|
112
|
+
echo "✅ TestPyPI 测试通过!"
|
|
113
|
+
echo ""
|
|
114
|
+
read -p "TestPyPI 测试成功,是否继续发布到正式 PyPI? (y/n): " continue_pypi
|
|
115
|
+
|
|
116
|
+
if [ "$continue_pypi" != "y" ]; then
|
|
117
|
+
echo "🛑 用户取消发布到正式 PyPI"
|
|
118
|
+
exit 0
|
|
119
|
+
fi
|
|
120
|
+
else
|
|
121
|
+
echo "❌ TestPyPI 发布失败"
|
|
122
|
+
exit 1
|
|
123
|
+
fi
|
|
124
|
+
fi
|
|
125
|
+
|
|
126
|
+
# 发布到正式 PyPI
|
|
127
|
+
echo ""
|
|
128
|
+
echo "🚀 发布到正式 PyPI..."
|
|
129
|
+
twine upload dist/*
|
|
130
|
+
|
|
131
|
+
if [ $? -eq 0 ]; then
|
|
132
|
+
echo ""
|
|
133
|
+
echo "✅ 成功发布到 PyPI!"
|
|
134
|
+
|
|
135
|
+
# 测试正式 PyPI 安装
|
|
136
|
+
echo ""
|
|
137
|
+
echo "🧪 测试正式 PyPI 安装..."
|
|
138
|
+
|
|
139
|
+
# 创建临时测试环境
|
|
140
|
+
TEST_ENV="/tmp/frp_test_$$"
|
|
141
|
+
python3 -m venv "$TEST_ENV"
|
|
142
|
+
source "$TEST_ENV/bin/activate"
|
|
143
|
+
|
|
144
|
+
# 等待 PyPI 更新
|
|
145
|
+
echo "⏳ 等待 PyPI 更新..."
|
|
146
|
+
sleep 10
|
|
147
|
+
|
|
148
|
+
# 安装并测试
|
|
149
|
+
pip install frp-tunnel --upgrade
|
|
150
|
+
|
|
151
|
+
echo ""
|
|
152
|
+
echo "🔍 测试命令..."
|
|
153
|
+
frp-tunnel --version
|
|
154
|
+
frp-tunnel --help | head -5
|
|
155
|
+
|
|
156
|
+
# 清理测试环境
|
|
157
|
+
deactivate
|
|
158
|
+
rm -rf "$TEST_ENV"
|
|
159
|
+
|
|
160
|
+
echo ""
|
|
161
|
+
echo "🎉 发布和测试完成!"
|
|
162
|
+
echo "📦 包地址: https://pypi.org/project/frp-tunnel/"
|
|
163
|
+
echo ""
|
|
164
|
+
echo "用户现在可以使用:"
|
|
165
|
+
echo " pip install frp-tunnel"
|
|
166
|
+
echo " frp-tunnel --help"
|
|
167
|
+
else
|
|
168
|
+
echo "❌ PyPI 发布失败"
|
|
169
|
+
exit 1
|
|
170
|
+
fi
|
frp_tunnel-1.0.5/publish.bat
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
REM PyPI Publishing Script for Windows
|
|
3
|
-
echo 🚀 Publishing frp-tunnel to PyPI...
|
|
4
|
-
|
|
5
|
-
REM Check if we're in the right directory
|
|
6
|
-
if not exist "pyproject.toml" (
|
|
7
|
-
echo ❌ Error: pyproject.toml not found. Run from project root.
|
|
8
|
-
exit /b 1
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
REM Install build dependencies
|
|
12
|
-
echo 📦 Installing build dependencies...
|
|
13
|
-
pip install --upgrade build twine
|
|
14
|
-
|
|
15
|
-
REM Clean previous builds
|
|
16
|
-
echo 🧹 Cleaning previous builds...
|
|
17
|
-
if exist "dist" rmdir /s /q dist
|
|
18
|
-
if exist "build" rmdir /s /q build
|
|
19
|
-
for /d %%i in (*.egg-info) do rmdir /s /q "%%i"
|
|
20
|
-
|
|
21
|
-
REM Build the package
|
|
22
|
-
echo 🔨 Building package...
|
|
23
|
-
python -m build
|
|
24
|
-
|
|
25
|
-
REM Check the built package
|
|
26
|
-
echo 🔍 Checking package...
|
|
27
|
-
twine check dist/*
|
|
28
|
-
|
|
29
|
-
REM Upload to PyPI
|
|
30
|
-
echo 📤 Uploading to PyPI...
|
|
31
|
-
if "%1"=="--test" (
|
|
32
|
-
echo 📋 Uploading to TestPyPI...
|
|
33
|
-
twine upload --repository testpypi dist/*
|
|
34
|
-
echo ✅ Uploaded to TestPyPI: https://test.pypi.org/project/frp-tunnel/
|
|
35
|
-
echo 🧪 Test install: pip install --index-url https://test.pypi.org/simple/ frp-tunnel
|
|
36
|
-
) else (
|
|
37
|
-
echo 📋 Uploading to PyPI...
|
|
38
|
-
twine upload dist/*
|
|
39
|
-
echo ✅ Published to PyPI: https://pypi.org/project/frp-tunnel/
|
|
40
|
-
echo 📦 Install: pip install frp-tunnel
|
|
41
|
-
)
|
|
42
|
-
|
|
43
|
-
echo 🎉 Publishing complete!
|
frp_tunnel-1.0.5/publish.py
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
PyPI Publishing Script
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
import os
|
|
7
|
-
import sys
|
|
8
|
-
import subprocess
|
|
9
|
-
import shutil
|
|
10
|
-
from pathlib import Path
|
|
11
|
-
|
|
12
|
-
def run_command(cmd, description):
|
|
13
|
-
"""Run command and handle errors"""
|
|
14
|
-
print(f"🔄 {description}...")
|
|
15
|
-
try:
|
|
16
|
-
result = subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True)
|
|
17
|
-
print(f"✅ {description} completed")
|
|
18
|
-
return result
|
|
19
|
-
except subprocess.CalledProcessError as e:
|
|
20
|
-
print(f"❌ {description} failed: {e.stderr}")
|
|
21
|
-
sys.exit(1)
|
|
22
|
-
|
|
23
|
-
def main():
|
|
24
|
-
"""Main publishing function"""
|
|
25
|
-
print("🚀 Publishing frp-tunnel to PyPI...")
|
|
26
|
-
|
|
27
|
-
# Check if we're in the right directory
|
|
28
|
-
if not Path("pyproject.toml").exists():
|
|
29
|
-
print("❌ Error: pyproject.toml not found. Run from project root.")
|
|
30
|
-
sys.exit(1)
|
|
31
|
-
|
|
32
|
-
# Check for test flag
|
|
33
|
-
test_mode = "--test" in sys.argv
|
|
34
|
-
|
|
35
|
-
# Install build dependencies
|
|
36
|
-
run_command("pip install --upgrade build twine", "Installing build dependencies")
|
|
37
|
-
|
|
38
|
-
# Clean previous builds
|
|
39
|
-
print("🧹 Cleaning previous builds...")
|
|
40
|
-
for path in ["dist", "build"]:
|
|
41
|
-
if Path(path).exists():
|
|
42
|
-
shutil.rmtree(path)
|
|
43
|
-
|
|
44
|
-
for egg_info in Path(".").glob("*.egg-info"):
|
|
45
|
-
shutil.rmtree(egg_info)
|
|
46
|
-
|
|
47
|
-
# Build the package
|
|
48
|
-
run_command("python -m build", "Building package")
|
|
49
|
-
|
|
50
|
-
# Check the built package
|
|
51
|
-
run_command("twine check dist/*", "Checking package")
|
|
52
|
-
|
|
53
|
-
# Upload to PyPI
|
|
54
|
-
if test_mode:
|
|
55
|
-
print("📋 Uploading to TestPyPI...")
|
|
56
|
-
run_command("twine upload --repository testpypi dist/*", "Uploading to TestPyPI")
|
|
57
|
-
print("✅ Uploaded to TestPyPI: https://test.pypi.org/project/frp-tunnel/")
|
|
58
|
-
print("🧪 Test install: pip install --index-url https://test.pypi.org/simple/ frp-tunnel")
|
|
59
|
-
else:
|
|
60
|
-
print("📋 Uploading to PyPI...")
|
|
61
|
-
run_command("twine upload dist/*", "Uploading to PyPI")
|
|
62
|
-
print("✅ Published to PyPI: https://pypi.org/project/frp-tunnel/")
|
|
63
|
-
print("📦 Install: pip install frp-tunnel")
|
|
64
|
-
|
|
65
|
-
print("🎉 Publishing complete!")
|
|
66
|
-
|
|
67
|
-
if __name__ == "__main__":
|
|
68
|
-
main()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|