代码拉取完成,页面将自动刷新
"""
setup
"""
import os
from typing import List
import semver
import setuptools
def versioning(version: str) -> str:
"""
version to specification
Author: Huan <zixia@zixia.net> (https://github.com/huan)
X.Y.Z -> X.Y.devZ
"""
sem_ver = semver.parse(version)
major = sem_ver['major']
minor = sem_ver['minor']
patch = str(sem_ver['patch'])
if minor % 2:
patch = 'dev' + patch
fin_ver = '%d.%d.%s' % (
major,
minor,
patch,
)
return fin_ver
def get_version() -> str:
"""
read version from VERSION file
"""
version = '0.0.0'
with open(
os.path.join(
os.path.dirname(__file__),
'VERSION'
)
) as version_fh:
# Get X.Y.Z
version = version_fh.read().strip()
# versioning from X.Y.Z to X.Y.devZ
version = versioning(version)
return version
def get_long_description() -> str:
"""get long_description"""
with open('README.md', 'r') as readme_fh:
return readme_fh.read()
def get_install_requires() -> List[str]:
"""get install_requires"""
with open('requirements.txt', 'r') as requirements_fh:
return requirements_fh.read().splitlines()
setuptools.setup(
name='wechaty-plugin-contrib',
version=get_version(),
author='wj-Mcat (吴京京)',
author_email='1435130236@qq.com',
description='Python Wechaty Plugin Contrib is a repo which store the '
'pupular wechaty contrib',
long_description=get_long_description(),
long_description_content_type='text/markdown',
license='Apache-2.0',
url='https://github.com/wechaty/python-wechaty-plugin-contrib',
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
install_requires=get_install_requires(),
classifiers=[
'Programming Language :: Python :: 3.7',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。