forked from wechaty/python-wechaty-puppet-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
60 lines (47 loc) · 1.43 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""
setup
"""
import semver
import setuptools
def versioning(version: str) -> str:
"""version to specification"""
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 setup() -> None:
"""setup"""
with open('README.md', 'r') as fh:
long_description = fh.read()
version = '0.0.0'
with open('VERSION', 'r') as fh:
version = versioning(fh.readline())
setuptools.setup(
name='wechaty-puppet-hostie',
version=version,
author='Huan LI (李卓桓)',
author_email='zixia@zixia.net',
description='Python Hostie Puppet for Wechaty',
long_description=long_description,
long_description_content_type='text/markdown',
license='Apache-2.0',
url='https://github.com/wechaty/python-wechaty-puppet-hostie',
packages=setuptools.find_packages('src'),
package_dir={'': 'src'},
install_requires = ['grpclib', 'pyee', 'requests',
'chatie-grpc', 'wechaty-puppet'],
classifiers=[
'Programming Language :: Python :: 3.7',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
],
)
setup()