File tree Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Expand file tree Collapse file tree 5 files changed +12
-8
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1212# language governing permissions and limitations under the License.
1313
1414from datetime import datetime
15- import pkg_resources
1615import os
1716import sys
17+ from pkg_resources import get_distribution
1818
1919sys .path .insert (0 , os .path .abspath (".." ))
2020
2323project = "sagemaker-experiments"
2424copyright = u"%s, Amazon" % datetime .now ().year
2525author = "Amazon Web Services"
26- version = pkg_resources . require (project )[ 0 ] .version
26+ version = get_distribution (project ).version
2727
2828# -- General configuration ---------------------------------------------------
2929
Original file line number Diff line number Diff line change 1+ [build-system ]
2+ requires = [
3+ " setuptools" ,
4+ " setuptools-scm" ,
5+ " wheel" ,
6+ ]
7+
8+ [tool .setuptools_scm ]
Original file line number Diff line number Diff line change @@ -23,10 +23,6 @@ def read(fname):
2323 return open (os .path .join (os .path .dirname (__file__ ), fname )).read ()
2424
2525
26- def read_version ():
27- return read ("VERSION" ).strip ()
28-
29-
3026# Declare minimal set for installation
3127required_packages = ["boto3>=1.10.32" ]
3228
@@ -39,7 +35,7 @@ def read_version():
3935
4036setup (
4137 name = "sagemaker-experiments" ,
42- version = read_version () ,
38+ use_scm_version = True ,
4339 description = "Open source library for Experiment Tracking in SageMaker Jobs and Notebooks" ,
4440 packages = find_packages ("src" ),
4541 package_dir = {"" : "src" },
@@ -60,6 +56,7 @@ def read_version():
6056 "Programming Language :: Python :: 3.6" ,
6157 "Programming Language :: Python :: 3.7" ,
6258 ],
59+ setup_requires = ["setuptools_scm" , "setuptools" ],
6360 install_requires = required_packages ,
6461 extras_require = {
6562 "test" : [
You can’t perform that action at this time.
0 commit comments