-
Notifications
You must be signed in to change notification settings - Fork 495
/
setup.py
65 lines (57 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
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
## Created by: Hang Zhang
## Email: zhanghang0704@gmail.com
## Copyright (c) 2020
##
## LICENSE file in the root directory of this source tree
##+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
import io
import os
import subprocess
from setuptools import setup, find_packages
cwd = os.path.dirname(os.path.abspath(__file__))
version = '0.0.6'
try:
if not os.getenv('RELEASE'):
from datetime import date
today = date.today()
day = today.strftime("b%Y%m%d")
version += day
except Exception:
pass
def create_version_file():
global version, cwd
print('-- Building version ' + version)
version_path = os.path.join(cwd, 'resnest', 'version.py')
with open(version_path, 'w') as f:
f.write('"""This is resnest version file."""\n')
f.write("__version__ = '{}'\n".format(version))
requirements = [
'numpy',
'tqdm',
'nose',
'torch>=1.0.0',
'Pillow',
'scipy',
'requests',
'iopath',
'fvcore',
]
if __name__ == '__main__':
create_version_file()
setup(
name="resnest",
version=version,
author="Hang Zhang",
author_email="zhanghang0704@gmail.com",
url="https://github.com/zhanghang1989/ResNeSt",
description="ResNeSt",
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
license='Apache-2.0',
install_requires=requirements,
packages=find_packages(exclude=["scripts", "examples", "tests"]),
package_data={'resnest': [
'LICENSE',
]},
)