forked from codertimo/BERT-pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
54 lines (45 loc) · 1.52 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
from setuptools import setup, find_packages
from setuptools.command.install import install
import os
import sys
__version__ = "0.0.1a3"
with open("requirements.txt") as f:
require_packages = [line[:-1] for line in f]
with open("README.md", "r", encoding="utf-8") as f:
long_description = f.read()
class VerifyVersionCommand(install):
"""Custom command to verify that the git tag matches our version"""
description = 'verify that the git tag matches our version'
def run(self):
tag = os.getenv('CIRCLE_TAG')
if tag != __version__:
info = "Git tag: {0} does not match the version of this app: {1}".format(
tag, __version__
)
sys.exit(info)
setup(
name="bert_pytorch",
version=__version__,
author='Junseong Kim',
author_email='[email protected]',
packages=find_packages(),
install_requires=require_packages,
url="https://github.com/codertimo/BERT-pytorch",
description="Google AI 2018 BERT pytorch implementation",
long_description=long_description,
long_description_content_type="text/markdown",
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
entry_points={
'console_scripts': [
'bert = bert_pytorch.__main__:train',
'bert-vocab = bert_pytorch.dataset.vocab:build',
]
},
cmdclass={
'verify': VerifyVersionCommand,
}
)