Skip to content

Commit 63bfc5a

Browse files
authored
V3 (#423)
* fix lint * 主版本移除python2支持
1 parent 4fcd03b commit 63bfc5a

File tree

4 files changed

+4
-9
lines changed

4 files changed

+4
-9
lines changed

.github/workflows/build.yml

+1-6
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
# fail-fast: false
6262
matrix:
6363
os: [windows, macos, ubuntu]
64-
python-version: ["2.7", "3.x"]
64+
python-version: ["3.x"]
6565
runs-on: ${{ matrix.os }}-latest
6666
timeout-minutes: 8
6767
steps:
@@ -71,7 +71,6 @@ jobs:
7171
with:
7272
python-version: ${{ matrix.python-version }}
7373
- name: Install dependencies
74-
if: matrix.python-version != '2.7'
7574
run: pip install pyinstaller
7675

7776
# Prepare build version and cert
@@ -85,17 +84,13 @@ jobs:
8584
- run: python ./run.py -h
8685

8786
- name: Package binary
88-
if: matrix.python-version != '2.7'
8987
run: python -O -m PyInstaller --noconfirm --clean .build/ddns.spec
9088

9189
- run: ./dist/ddns || test -e config.json
92-
if: matrix.python-version != '2.7'
9390
- run: ./dist/ddns -h
94-
if: matrix.python-version != '2.7'
9591

9692
# Upload build result
9793
- uses: actions/upload-artifact@v3
98-
if: matrix.python-version != '2.7'
9994
with:
10095
name: ${{ matrix.os }}-py${{ matrix.python-version }}
10196
path: dist/

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- 兼容和跨平台:
1515
- [x] 可执行文件(无需 python 环境)
1616
- [x] 多系统兼容 ![cross platform](https://img.shields.io/badge/platform-windows_%7C%20linux_%7C%20osx-success.svg?style=social)
17-
- [x] python2 和 python3 支持 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ddns.svg?style=social)
17+
- [x] python3 支持 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ddns.svg?style=social)(2.x支持python2和python3)
1818
- [x] PIP 安装 ![PyPI - Wheel](https://img.shields.io/pypi/wheel/ddns.svg?style=social)
1919
- [x] Docker 支持(@NN708)
2020
- 域名支持:

run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def get_ip(ip_type, index="default"):
4141
"""
4242
if index is False: # disabled
4343
return False
44-
elif type(index) == list: # 如果获取到的规则是列表,则依次判断列表中每一个规则,直到找到一个可以正确获取到的IP
44+
elif type(index) is list: # 如果获取到的规则是列表,则依次判断列表中每一个规则,直到找到一个可以正确获取到的IP
4545
value = None
4646
for i in index:
4747
value = get_ip(ip_type, i)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
# that you indicate whether you support Python 2, Python 3 or both.
136136
# These classifiers are *not* checked by 'pip install'. See instead
137137
# 'python_requires' below.
138-
'Programming Language :: Python :: 2.7',
138+
# 'Programming Language :: Python :: 2.7',
139139
'Programming Language :: Python :: 3',
140140
],
141141

0 commit comments

Comments
 (0)