-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
73 lines (59 loc) · 1.87 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
61
62
63
64
65
66
67
68
69
70
71
72
"""
@author: SunYanCN
@contact: sunyanhust@163.com
@blog: https://sunyancn.github.io
@version: 1.0
@license: MIT Licence
@file: setup.py.py
@time: 2019-11-25 20:02:28
"""
import codecs
import os
import pathlib
import re
from setuptools import find_packages, setup
HERE = pathlib.Path(__file__).parent
def read(*parts):
with codecs.open(os.path.join(HERE, *parts), 'r') as fp:
return fp.read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
__name__ = 'band'
__author__ = "sunyancn"
__copyright__ = "Copyright 2019, SunYanCN"
__credits__ = []
__license__ = "MIT License"
__maintainer__ = "SunYanCN"
__email__ = "sunyanhust@163.com"
__url__ = 'https://github.com/sunyancn/band'
__description__ = 'BERT Application'
__version__ = find_version('band', 'version.py')
README = (HERE / "README.md").read_text(encoding='utf-8')
with codecs.open('requirements.txt', 'r', 'utf8') as reader:
install_requires = list(map(lambda x: x.strip(), reader.readlines()))
setup(
name=__name__,
version=__version__,
description=__description__,
python_requires='>3.6',
long_description=README,
long_description_content_type="text/markdown",
author=__author__,
author_email=__email__,
url=__url__,
packages=find_packages(exclude=('tests',)),
install_requires=install_requires,
include_package_data=True,
license=__license__,
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy'
],
)