2424import uuid
2525
2626from setuptools import setup , find_packages
27- from setuptools .command import install as _install
28-
27+ from setuptools .command .install import install as _install
2928
3029def read (path ):
3130 with open (path , 'r' ) as f :
3231 return f .read ()
3332
34-
3533class bcolor :
3634 GREEN = '\033 [92m'
3735 RED = '\033 [91m'
3836 YELLOW = '\033 [93m'
3937 CYAN = '\033 [96m'
4038 END = '\033 [0m'
4139
42- class Configure (_install . install ):
40+ class Configure (_install ):
4341 probe_conf = {}
4442 config_old = {}
4543 config_old ['name' ] = "Python MiniProbe"
@@ -57,6 +55,8 @@ class Configure(_install.install):
5755
5856 def run (self ):
5957 conf_avail = False
58+ print dir (_install )
59+ _install .do_egg_install (self )
6060 if not os .getuid () == 0 :
6161 print bcolor .RED + "You must run me as root user!" + bcolor .END
6262 print bcolor .RED + "Rerun me with sudo " + __file__ + bcolor .END
@@ -87,6 +87,7 @@ def run(self):
8787 else :
8888 print "Exiting!"
8989 sys .exit ()
90+ pass
9091
9192 def file_check (self , check_path ):
9293 # Check if a give file exists
@@ -333,8 +334,6 @@ def get_config(self, config_old):
333334 print ""
334335 print bcolor .YELLOW + "Checking for necessary modules and Python Version" + bcolor .END
335336 try :
336- sys .path .append ('./' )
337- sys .path .append ('./miniprobe' )
338337 import hashlib
339338 import string
340339 import json
@@ -428,7 +427,7 @@ def remove_config(self):
428427 "License :: OSI Approved :: BSD License" ,
429428 "Programming Language :: Python" ,
430429 ],
431- cmdclass = {'configure ' : Configure }
430+ cmdclass = {'install ' : Configure }
432431)
433432
434433
0 commit comments