Skip to content

Commit 5f9f713

Browse files
committed
Changed setup.py to use single command to install and configure, removed configure from install.sh
1 parent 9b4a440 commit 5f9f713

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ if [ "$DOWNLOADED" = true ]
5353
then
5454
echo "Starting to install the miniprobe and requirements"
5555
python setup.py install
56-
python setup.py configure
5756
fi

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,20 @@
2424
import uuid
2525

2626
from setuptools import setup, find_packages
27-
from setuptools.command import install as _install
28-
27+
from setuptools.command.install import install as _install
2928

3029
def read(path):
3130
with open(path, 'r') as f:
3231
return f.read()
3332

34-
3533
class 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

Comments
 (0)