forked from asappresearch/sru
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (51 loc) · 1.66 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
from setuptools import setup
import os
import codecs
PACKAGE = 'sru'
def readme():
""" Return the README text.
"""
with codecs.open('README.md', encoding='utf-8') as fh:
return fh.read()
def get_version():
""" Gets the current version of the package.
"""
version_py = os.path.join(os.path.dirname(__file__), 'sru/version.py')
with open(version_py) as fh:
for line in fh:
if line.startswith('__version__'):
return line.split('=')[-1].strip() \
.replace('"', '').replace("'", '')
raise ValueError('Failed to parse version from: {}'.format(version_py))
def get_requirements():
with open('requirements.txt') as fh:
lines = fh.readlines()
lines = [line.strip() for line in lines]
return [line for line in lines if line]
setup(
# Package information
name=PACKAGE,
version=get_version(),
description='Simple Recurrent Units for Highly Parallelizable Recurrence',
long_description=readme(),
long_description_content_type="text/markdown", # make pypi render long description as markdown
keywords='deep learning rnn lstm cudnn sru fast pytorch torch',
classifiers=[
],
# Author information
url='https://github.com/taolei87/sru',
author='Tao Lei, Yu Zhang, Sida I. Wang, Hui Dai and Yoav Artzi',
author_email='[email protected]',
license='MIT',
# What is packaged here.
packages=['sru', 'sru/csrc'],
# What to include
package_data={
'': ['*.txt', '*.rst', '*.md', '*.cpp', '*.cu']
},
# Dependencies
install_requires=get_requirements(),
dependency_links=[
],
zip_safe=False
)