-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
64 lines (45 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
from setuptools import setup
import os
def find_version(*file_paths):
def read(*parts):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, *parts)) as fp:
return fp.read().strip()
import re
version_file = read(*file_paths)
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.")
def readme():
with open('README.md', 'r') as f:
return f.read()
version = find_version("pytorchtrainer", "__init__.py")
setup(name="pytorchtrainer",
version=version,
description='PyTorch module trainer',
long_description=readme(),
long_description_content_type='text/markdown',
license='MIT',
url='https://github.com/benoitmartin88/pytorchtrainer',
project_urls={
'Bug Reports': 'https://github.com/benoitmartin88/pytorchtrainer/issues',
'Source': 'https://github.com/benoitmartin88/pytorchtrainer',
},
author='Benoit Martin',
author_email='benoitmartin88.pro@gmail.com',
python_requires='>=3.5',
keywords='pytorch trainer',
packages=['pytorchtrainer',
'pytorchtrainer.callback',
'pytorchtrainer.metric',
'pytorchtrainer.stop_condition'],
install_requires=["torch >= 1.0.0"],
# tests_require=["unittest"],
test_suite='test',
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)