-
Notifications
You must be signed in to change notification settings - Fork 7
/
setup.py
62 lines (53 loc) · 1.64 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
from setuptools import setup, find_packages
import unittest
import codecs
import re
import os
here = os.path.abspath(os.path.dirname(__file__))
def test_suite():
test_loader = unittest.TestLoader()
test_suite = test_loader.discover(
os.path.join(here, "tests"),
pattern="test_*.py"
)
return test_suite
def find_version():
"""Find version in teapot/__init__.py"""
with codecs.open(os.path.join(here, "teapot", "__init__.py"), 'r') as fp:
version_file = fp.read()
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.")
setup(
name="teapot-nlp",
version=find_version(),
description="Source and target side evaluation of adversarial attacks on "
"NLP models",
long_description=codecs.open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
url="https://github.com/pmichel31415/teapot-nlp",
author="Paul Michel",
license="MIT",
test_suite="setup.test_suite",
classifiers=[
"Intended Audience :: Developers",
"Topic :: Text Processing",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
],
packages=find_packages(),
entry_points={
"console_scripts": [
"teapot=teapot.main:main",
],
},
install_requires=[
"sacrebleu>=1.3.1",
],
include_package_data=True,
)