-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
50 lines (43 loc) · 1.45 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
from setuptools import setup, find_packages
import unittest
import codecs
import re
import os
# def test_suite():
# test_loader = unittest.TestLoader()
# test_suite = test_loader.discover("cmulab/tests", pattern="test_*.py")
#
# return test_suite
def find_version():
"""Find version in cmulab/__init__.py"""
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, "cmulab", "__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.")
with open("requirements_detailed.txt", "r") as f:
requirements = f.read().splitlines()
setup(
name="cmulab",
version=find_version(),
description="CMU Lingistic Annotation Backend",
long_description=codecs.open("README.md", encoding="utf-8").read(),
long_description_content_type="text/markdown",
url="https://github.com/neulab/cmulab",
author="Antonios Anastasopoulos and Graham Neubig",
license="BSD 3-Clause",
test_suite="setup.test_suite",
classifiers=[
"Intended Audience :: Developers",
"Topic :: Text Processing",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
],
packages=find_packages(),
install_requires=requirements,
include_package_data=True,
)