forked from fastai/fastai
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
90 lines (77 loc) · 2.29 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
import sys
from pathlib import Path
from setuptools import setup, find_packages
def create_version_file(version):
print('-- Building version ' + version)
version_path = Path.cwd() / 'fastai' / 'version.py'
with open(version_path, 'w') as f:
f.write("__version__ = '{}'\n".format(version))
# version
version = '1.0.0b7'
create_version_file(version)
with open('README.md') as readme_file:
readme = readme_file.read()
with open('HISTORY.md') as history_file:
history = history_file.read()
def to_list(buffer): return list(filter(None, buffer.splitlines()))
# XXX: require torch>=1.0.0 once it's released, for now get the user to install it explicitly
requirements = to_list("""
fastprogress
ipython
matplotlib
numpy>=1.12
pandas
Pillow
requests
scipy
spacy
torchvision>=0.2.1
typing
""")
if sys.version_info < (3,7): requirements.append('dataclasses')
# optional requirements to skip for now:
# cupy - is only required for QRNNs - sgguger thinks later he will get rid of this dep.
# fire - will be eliminated shortly
# nbconvert
# nbformat
# traitlets
# jupyter_contrib_nbextensions
setup_requirements = to_list("""
pytest-runner
""")
test_requirements = to_list("""
pytest
numpy>=1.12
""")
# list of classifiers: https://pypi.org/pypi?%3Aaction=list_classifiers
setup(
author="Jeremy Howard",
author_email='info@fast.ai',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
description="fastai makes deep learning with PyTorch faster, more accurate, and easier",
install_requires=requirements,
license="Apache Software License 2.0",
long_description=readme + '\n\n' + history,
long_description_content_type='text/markdown',
include_package_data=True,
keywords='fastai',
name='fastai',
packages=find_packages(),
setup_requires=setup_requirements,
test_suite='tests',
tests_require=test_requirements,
python_requires='>=3.6',
url='https://github.com/fastai/fastai_pytorch',
version=version,
zip_safe=False,
)