-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsetup.py
53 lines (45 loc) · 1.71 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
import os
from setuptools import find_packages, setup
def readme():
with open('README.md', encoding='utf-8') as f:
content = f.read()
return content
def get_version():
version_file = 'easytorch/version.py'
with open(version_file, 'r', encoding='utf-8') as f:
exec(compile(f.read(), version_file, 'exec'))
return locals()['__version__']
def get_requirements(filename='requirements.txt'):
here = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(here, filename), 'r') as f:
requires = [line.replace('\n', '') for line in f.readlines()]
return requires
if __name__ == '__main__':
setup(
name='easy-torch',
version=get_version(),
description='Simple and powerful pytorch framework.',
long_description=readme(),
long_description_content_type='text/markdown',
author='Yuhao Wang',
author_email='[email protected]',
keywords='pytorch, deep learning',
url='https://github.com/cnstark/easytorch',
include_package_data=True,
packages=find_packages(exclude=('tests',)),
classifiers=[
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Utilities'
],
entry_points={
'console_scripts': ['easytrain=easytorch.entry_points:easytrain'],
},
license='Apache License 2.0',
install_requires=get_requirements(),
zip_safe=False
)