mirror of
https://github.com/NewFuture/DDNS.git
synced 2022-04-19 20:24:44 +00:00
fix(pip): setup celan and version
This commit is contained in:
@@ -18,19 +18,19 @@ import sys
|
||||
from util import ip
|
||||
from util.cache import Cache
|
||||
|
||||
__version__ = "python@none-build" # CI 时会被Tag替换
|
||||
__version__ = "${BUILD_SOURCEBRANCHNAME}@${BUILD_DATE}" # CI 时会被Tag替换
|
||||
__description__ = "自动更新DNS记录指向本地IP [automatically update DNS records to dynamic local IP]"
|
||||
__doc__ = """
|
||||
ddns[%s]
|
||||
(i) 文档主页[homepage or docs]: https://ddns.newfuture.cc/
|
||||
(?) 问题和帮助[issues or bugs]: https://github.com/NewFuture/DDNS/issues
|
||||
Copyright (c) New Future ♥ (MIT License)
|
||||
Copyright (c) New Future (MIT License)
|
||||
""" % (__version__)
|
||||
|
||||
if getattr(sys, 'frozen', False):
|
||||
__version__ = "${BUILD_SOURCEBRANCHNAME}@${BUILD_DATE}"
|
||||
# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-OpenSSL-Certificate
|
||||
environ['SSL_CERT_FILE'] = path.join(sys._MEIPASS, 'lib', 'cert.pem')
|
||||
environ['SSL_CERT_FILE'] = path.join(
|
||||
getattr(sys, '_MEIPASS'), 'lib', 'cert.pem')
|
||||
|
||||
CACHE_FILE = path.join(gettempdir(), 'ddns.cache')
|
||||
|
||||
|
||||
@@ -20,6 +20,11 @@ from run import __description__
|
||||
|
||||
here = path.abspath(path.dirname(__file__))
|
||||
|
||||
# Clean dist after binary build
|
||||
if path.isfile('dist/ddns') or path.isfile('dist/ddns.exe') or path.isfile('dist/ddns-osx'):
|
||||
from shutil import rmtree
|
||||
rmtree('dist/')
|
||||
|
||||
# Get the long description from the README file
|
||||
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
||||
long_description = f.read()
|
||||
@@ -218,4 +223,6 @@ setup(
|
||||
'Bug Reports': 'https://github.com/NewFuture/DDNS/issues',
|
||||
'Source': 'https://github.com/NewFuture/DDNS',
|
||||
},
|
||||
license="MIT",
|
||||
platforms=['any'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user