Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
haowen-xu committed Apr 9, 2020
1 parent 965a0f6 commit 1b0f1eb
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import ast
import codecs
import os
import re
import sys
from setuptools import setup, find_packages


_version_re = re.compile(r'__version__\s+=\s+(.*)')
_source_dir = os.path.split(os.path.abspath(__file__))[0]

if sys.version_info[0] == 2:
def read_file(path):
with open(path, 'rb') as f:
return f.read()
else:
def read_file(path):
with codecs.open(path, 'rb', 'utf-8') as f:
return f.read()

version = str(ast.literal_eval(_version_re.search(
read_file(os.path.join(_source_dir, 'tensorkit/__init__.py'))).group(1)))

requirements_list = list(filter(
lambda v: v and not v.startswith('#'),
(s.strip() for s in read_file(
os.path.join(_source_dir, 'requirements.txt')).split('\n'))
))
dependency_links = [s for s in requirements_list if s.startswith('git+')]
install_requires = [s for s in requirements_list if not s.startswith('git+')]


setup(
name='tensorkit',
version=version,
url='https://github.com/haowen-xu/tensorkit/',
license='MIT',
author='Haowen Xu',
author_email='haowen.xu@outlook.com',
description='A set of utilities for writing neural network models.',
long_description=__doc__,
packages=find_packages('.', include=['tensorkit', 'tensorkit.*']),
zip_safe=False,
platforms='any',
setup_requires=['setuptools'],
install_requires=install_requires,
dependency_links=dependency_links,
classifiers=[
'Development Status :: 2 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)

0 comments on commit 1b0f1eb

Please sign in to comment.