Skip to content

Commit

Permalink
V3 (#423)
Browse files Browse the repository at this point in the history
* fix lint

* 主版本移除python2支持
  • Loading branch information
NewFuture authored Feb 14, 2024
1 parent 4fcd03b commit 63bfc5a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
# fail-fast: false
matrix:
os: [windows, macos, ubuntu]
python-version: ["2.7", "3.x"]
python-version: ["3.x"]
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 8
steps:
Expand All @@ -71,7 +71,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: matrix.python-version != '2.7'
run: pip install pyinstaller

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

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

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

# Upload build result
- uses: actions/upload-artifact@v3
if: matrix.python-version != '2.7'
with:
name: ${{ matrix.os }}-py${{ matrix.python-version }}
path: dist/
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- 兼容和跨平台:
- [x] 可执行文件(无需 python 环境)
- [x] 多系统兼容 ![cross platform](https://img.shields.io/badge/platform-windows_%7C%20linux_%7C%20osx-success.svg?style=social)
- [x] python2 和 python3 支持 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ddns.svg?style=social)
- [x] python3 支持 ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ddns.svg?style=social)(2.x支持python2和python3)
- [x] PIP 安装 ![PyPI - Wheel](https://img.shields.io/pypi/wheel/ddns.svg?style=social)
- [x] Docker 支持(@NN708)
- 域名支持:
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def get_ip(ip_type, index="default"):
"""
if index is False: # disabled
return False
elif type(index) == list: # 如果获取到的规则是列表,则依次判断列表中每一个规则,直到找到一个可以正确获取到的IP
elif type(index) is list: # 如果获取到的规则是列表,则依次判断列表中每一个规则,直到找到一个可以正确获取到的IP
value = None
for i in index:
value = get_ip(ip_type, i)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
# that you indicate whether you support Python 2, Python 3 or both.
# These classifiers are *not* checked by 'pip install'. See instead
# 'python_requires' below.
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
],

Expand Down

0 comments on commit 63bfc5a

Please sign in to comment.