File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
import platform
2
2
import os
3
- import sys
4
3
5
4
from urllib .request import urlopen
6
5
@@ -22,8 +21,10 @@ class PostInstallCommand(install):
22
21
def run (self ):
23
22
version_tag = 'v{}' .format (version )
24
23
url_template = 'https://github.com/LeetCode-OpenSource/py-sourcemap/releases/download/{tag}/py_sourcemap.cpython-{py_ver}-{platform}.so'
25
- py_version = '{}{}m' .format (sys .version_info .major ,
26
- sys .version_info .minor )
24
+ (major , minor , _ ) = platform .python_version_tuple ()
25
+ if major != '3' or not (minor in ['5' , '6' , '7' ]):
26
+ raise Exception ('Only python 3.5, 3.6, 3.7 are supported' )
27
+ py_version = '{}{}m' .format (major , minor )
27
28
system = platform .system ()
28
29
if system == 'Linux' :
29
30
usr_platform = 'x86_64-linux-gnu'
You can’t perform that action at this time.
0 commit comments