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"
@@ -61,6 +59,7 @@ def run(self):
6159 print bcolor .RED + "You must run me as root user!" + bcolor .END
6260 print bcolor .RED + "Rerun me with sudo " + __file__ + bcolor .END
6361 sys .exit (2 )
62+ _install .do_egg_install (self )
6463 print ""
6564 print bcolor .CYAN + "Welcome to the Miniprobe (Python) for PRTG installer" + bcolor .END
6665 if self .file_check (self .path ):
@@ -87,6 +86,7 @@ def run(self):
8786 else :
8887 print "Exiting!"
8988 sys .exit ()
89+ pass
9090
9191 def file_check (self , check_path ):
9292 # Check if a give file exists
@@ -333,8 +333,6 @@ def get_config(self, config_old):
333333 print ""
334334 print bcolor .YELLOW + "Checking for necessary modules and Python Version" + bcolor .END
335335 try :
336- sys .path .append ('./' )
337- sys .path .append ('./miniprobe' )
338336 import hashlib
339337 import string
340338 import json
@@ -428,7 +426,7 @@ def remove_config(self):
428426 "License :: OSI Approved :: BSD License" ,
429427 "Programming Language :: Python" ,
430428 ],
431- cmdclass = {'configure ' : Configure }
429+ cmdclass = {'install ' : Configure }
432430)
433431
434432
0 commit comments