-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathsetup.py
64 lines (53 loc) · 1.68 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
import re
import os
from setuptools import setup, find_packages
def get_version():
filepath = os.path.join(
os.path.dirname(__file__), 'cnn_finetune', '__init__.py'
)
with open(filepath) as f:
return re.findall(r"__version__ = '([\d.\w]+)'", f.read())[0]
def get_long_description():
base_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base_dir, 'README.md')) as f:
return f.read()
requirements = [
'torch',
'torchvision>=0.3.0',
'pretrainedmodels>=0.7.4',
'scipy', # required for torchvision
'tqdm', # required for pretrainedmodels
]
tests_requirements = [
'pytest',
'numpy',
'pytest-cov',
]
setup(
name='cnn_finetune',
version=get_version(),
description=(
'Fine-tune pretrained Convolutional Neural Networks with PyTorch'
),
long_description=get_long_description(),
long_description_content_type='text/markdown',
author='Alex Parinov',
author_email='creafz@gmail.com',
url='https://github.com/creafz/pytorch-cnn-finetune',
license='MIT',
install_requires=requirements,
extras_require={'tests': tests_requirements},
python_requires='>=3.5',
classifiers=[
'Development Status :: 4 - Beta',
'License :: OSI Approved :: MIT License',
'Intended Audience :: Developers',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
packages=find_packages(exclude=['tests', 'examples']),
)