1
- # ! /usr/bin/python
2
- # -*- coding: utf-8 -*-
3
-
4
- # Copyright 2020 NVIDIA. All Rights Reserved.
1
+ # coding=utf-8
2
+ # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
5
3
#
6
4
# Licensed under the Apache License, Version 2.0 (the "License");
7
5
# you may not use this file except in compliance with the License.
14
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
13
# See the License for the specific language governing permissions and
16
14
# limitations under the License.
17
- # =============================================================================
18
15
19
16
"""Setup for pip package."""
20
17
25
22
if sys .version_info < (3 ,):
26
23
raise Exception ("Python 2 is not supported by Megatron." )
27
24
28
- def is_build_action ():
29
- if len (sys .argv ) <= 1 :
30
- return False
31
-
32
- BUILD_TOKENS = ["egg_info" , "dist" , "bdist" , "sdist" , "install" , "build" , "develop" , "style" ]
33
-
34
- if any ([sys .argv [1 ].startswith (x ) for x in BUILD_TOKENS ]):
35
- return True
36
- else :
37
- return False
38
-
39
-
40
25
from megatron .package_info import (
41
- __contact_emails__ ,
42
- __contact_names__ ,
43
26
__description__ ,
44
27
__url__ ,
45
28
__download_url__ ,
@@ -49,6 +32,9 @@ def is_build_action():
49
32
__version__ ,
50
33
)
51
34
35
+ with open ("README.md" , "r" ) as fh :
36
+ long_description = fh .read ()
37
+
52
38
###############################################################################
53
39
# Dependency Loading #
54
40
# %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% #
@@ -71,38 +57,21 @@ def req_file(filename):
71
57
# https://packaging.python.org/en/latest/single_source_version.html
72
58
version = __version__ ,
73
59
description = __description__ ,
60
+ long_description = long_description ,
61
+ long_description_content_type = "text/markdown" ,
74
62
# The project's main homepage.
75
63
url = __url__ ,
76
- # Author details
77
- author = __contact_names__ ,
78
- author_email = __contact_emails__ ,
79
- # maintainer Details
80
- maintainer = __contact_names__ ,
81
- maintainer_email = __contact_emails__ ,
82
64
# The licence under which the project is released
83
65
license = __license__ ,
84
66
classifiers = [
85
- # How mature is this project? Common values are
86
- # 1 - Planning
87
- # 2 - Pre-Alpha
88
- # 3 - Alpha
89
- # 4 - Beta
90
- # 5 - Production/Stable
91
- # 6 - Mature
92
- # 7 - Inactive
93
67
'Development Status :: 4 - Beta' ,
94
68
# Indicate who your project is intended for
95
69
'Intended Audience :: Developers' ,
96
70
'Intended Audience :: Science/Research' ,
97
71
'Intended Audience :: Information Technology' ,
98
72
# Indicate what your project relates to
99
- 'Topic :: Scientific/Engineering' ,
100
- 'Topic :: Scientific/Engineering :: Mathematics' ,
101
- 'Topic :: Scientific/Engineering :: Image Recognition' ,
102
73
'Topic :: Scientific/Engineering :: Artificial Intelligence' ,
103
- 'Topic :: Software Development :: Libraries' ,
104
74
'Topic :: Software Development :: Libraries :: Python Modules' ,
105
- 'Topic :: Utilities' ,
106
75
# Pick your license as you wish (should match "license" above)
107
76
'License :: OSI Approved :: Apache Software License' ,
108
77
# Supported python versions
@@ -114,6 +83,7 @@ def req_file(filename):
114
83
'Natural Language :: English' ,
115
84
'Operating System :: OS Independent' ,
116
85
],
86
+ python_requires = '>=3.6' ,
117
87
packages = setuptools .find_packages (),
118
88
install_requires = install_requires ,
119
89
# Add in any packaged data.
0 commit comments