@@ -918,6 +918,8 @@ def _do_it(self, mode='update'):
918
918
if platform .system ().lower ().startswith ('linux' ):
919
919
parser .add_argument ('--python2' , action = 'store_true' ,
920
920
help = 'install using python 2.' )
921
+ else :
922
+ parser .add_argument ('--python2' , action = 'store_true' , help = SUPPRESS )
921
923
parser .add_argument ('-R' , '--uninstall' , action = 'store_true' ,
922
924
help = 'uninstall PyRadio.' )
923
925
@@ -944,33 +946,34 @@ def _do_it(self, mode='update'):
944
946
args = parser .parse_args ()
945
947
sys .stdout .flush ()
946
948
947
- if args .brew != "False" :
948
- if args .brew is None :
949
- param = ' --fix-mac-path'
950
- else :
951
- param = ' --warning --fix-mac-path "' + args .brew + '"'
952
- #### print('parameter: ' + param)
953
- try :
954
- from urllib .request import urlretrieve
955
- except :
956
- from urllib import urlretrieve
957
- try :
958
- r = urlretrieve ('https://raw.githubusercontent.com/coderholic/pyradio/master/devel/build_install_pyradio' )
959
- except :
960
- print ('Cannot contact github...' )
961
- sys .exit (1 )
962
- if int (r [1 ]['content-length' ]) < 1000 :
963
- print ('Cannot contact github...' )
964
- sys .exit (1 )
965
- script = r [0 ]
966
- #### print('script:', script)
967
- if exists ('/Users/Max/pyradio/devel/build_install_pyradio' ):
968
- script = '/Users/Max/pyradio/devel/build_install_pyradio'
969
- #### print('script:', script)
970
- # now I can run the script
971
- subprocess .call ('bash -c "' + script + param + '"' , shell = True )
972
- os .remove (r [0 ])
973
- sys .exit ()
949
+ if platform .system ().lower ().startswith ('darwin' ):
950
+ if args .brew != "False" :
951
+ if args .brew is None :
952
+ param = ' --fix-mac-path'
953
+ else :
954
+ param = ' --warning --fix-mac-path "' + args .brew + '"'
955
+ #### print('parameter: ' + param)
956
+ try :
957
+ from urllib .request import urlretrieve
958
+ except :
959
+ from urllib import urlretrieve
960
+ try :
961
+ r = urlretrieve ('https://raw.githubusercontent.com/coderholic/pyradio/master/devel/build_install_pyradio' )
962
+ except :
963
+ print ('Cannot contact github...' )
964
+ sys .exit (1 )
965
+ if int (r [1 ]['content-length' ]) < 1000 :
966
+ print ('Cannot contact github...' )
967
+ sys .exit (1 )
968
+ script = r [0 ]
969
+ #### print('script:', script)
970
+ if exists ('/Users/Max/pyradio/devel/build_install_pyradio' ):
971
+ script = '/Users/Max/pyradio/devel/build_install_pyradio'
972
+ #### print('script:', script)
973
+ # now I can run the script
974
+ subprocess .call ('bash -c "' + script + param + '"' , shell = True )
975
+ os .remove (r [0 ])
976
+ sys .exit ()
974
977
975
978
if not PY3 and not args .python2 :
976
979
print_trying_to_install ()
0 commit comments