File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ __version__ = "1.0.2"
Original file line number Diff line number Diff line change 1
1
import sys
2
2
import warnings
3
+ import os .path
3
4
4
5
try :
5
6
from setuptools import setup
25
26
install_requires .append ('idna' )
26
27
install_requires .append ('requests[security]' )
27
28
29
+ def read (rel_path ):
30
+ here = os .path .abspath (os .path .dirname (__file__ ))
31
+ with open (os .path .join (here , rel_path ), 'r' ) as fp :
32
+ return fp .read ()
33
+
34
+ def get_version (rel_path ):
35
+ for line in read (rel_path ).splitlines ():
36
+ if line .startswith ('__version__' ):
37
+ delim = '"' if '"' in line else "'"
38
+ return line .split (delim )[1 ]
39
+ else :
40
+ raise RuntimeError ("Unable to find a valid __version__ string in %s." % rel_path )
41
+
28
42
setup (
29
43
name = 'scaleapi' ,
30
44
packages = ['scaleapi' ],
31
- version = '1.0.2' ,
45
+ version = get_version ( "scaleapi/_version.py" ) ,
32
46
description = 'The official Python client library for Scale AI, the Data Platform for AI' ,
33
47
author = 'Scale AI' ,
34
48
author_email = 'support@scale.com' ,
You can’t perform that action at this time.
0 commit comments