File tree Expand file tree Collapse file tree 2 files changed +42
-6
lines changed Expand file tree Collapse file tree 2 files changed +42
-6
lines changed Original file line number Diff line number Diff line change 1- bin /
1+ bin /*
22VARIANT
33BINDIR
44deps /*
5- deps /pytorch /*
6- deps /tensorflow /*
7- deps /dlpack /*
8- deps /install /*
9- ! deps /readies /*
5+ ! deps /readies /
106! deps /* .py
117examples /js /node_modules /
128examples /js /package-lock.json
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+
3+ import sys
4+ import os
5+ import argparse
6+
7+ READIES_PATH = os .path .realpath (os .path .join (os .path .dirname (__file__ ), ".." ))
8+ sys .path .insert (0 , READIES_PATH )
9+ from paella import Platform
10+
11+ parser = argparse .ArgumentParser (description = 'Report platform characteristics.' )
12+ parser .add_argument ('--os' , action = "store_true" , help = 'Operating system' )
13+ parser .add_argument ('--version' , action = "store_true" , help = 'OS/Distribution version' )
14+ parser .add_argument ('--dist' , action = "store_true" , help = 'Linux distribution (if applicable)' )
15+ parser .add_argument ('--arch' , action = "store_true" , help = 'CPU Architecture' )
16+ parser .add_argument ('--kernel' , action = "store_true" , help = 'Kernel version (if applicable)' )
17+ parser .add_argument ('--glibc' , action = "store_true" , help = 'GLIBC version (if applicable)' )
18+ args = parser .parse_args ()
19+
20+ platform = Platform ()
21+ ret = ""
22+ if args .os :
23+ ret += " " + platform .os
24+ if args .dist :
25+ ret += " " + platform .dist
26+ if args .version :
27+ ret += " " + platform .os_ver
28+ if args .arch :
29+ ret += " " + platform .arch
30+ if args .kernel :
31+ pass
32+ if args .glibc :
33+ pass
34+ if ret == "" :
35+ os = platform .os
36+ dist = platform .dist
37+ if dist != "" :
38+ os = dist + " " + os
39+ ret = os + " " + platform .os_ver + " " + platform .arch
40+ print (ret .strip ())
You can’t perform that action at this time.
0 commit comments