Specify correct installroot in setup.py
This was testing on both Mac OS X and Linux.
This commit is contained in:
18
setup.py
18
setup.py
@@ -118,19 +118,9 @@ class install(_install):
|
|||||||
prefix = opts['exec_prefix']
|
prefix = opts['exec_prefix']
|
||||||
root = opts['root']
|
root = opts['root']
|
||||||
|
|
||||||
# prefer root for installdir
|
installroot = install_lib.install_dir
|
||||||
if root is not None:
|
|
||||||
installroot = root
|
|
||||||
elif prefix is not None:
|
|
||||||
installroot = prefix
|
|
||||||
else:
|
|
||||||
installroot = "/"
|
|
||||||
|
|
||||||
# exception is "/usr"
|
default_library_paths.insert(0, installroot)
|
||||||
if installroot.startswith("/usr"):
|
|
||||||
installroot = "/"
|
|
||||||
|
|
||||||
default_library_paths.insert(0, "%s/usr/local/lib" % installroot)
|
|
||||||
_install.run(self)
|
_install.run(self)
|
||||||
|
|
||||||
# Another Mac-ism... If the libraries are installed
|
# Another Mac-ism... If the libraries are installed
|
||||||
@@ -143,13 +133,13 @@ class install(_install):
|
|||||||
print("***************************************************")
|
print("***************************************************")
|
||||||
print("** ")
|
print("** ")
|
||||||
print("** PyECLib libraries have been installed to: ")
|
print("** PyECLib libraries have been installed to: ")
|
||||||
print("** %susr/local/lib" % installroot)
|
print("** %s" % installroot)
|
||||||
print("** ")
|
print("** ")
|
||||||
print("** Any user using this library must update: ")
|
print("** Any user using this library must update: ")
|
||||||
print("** %s" % ldpath_str)
|
print("** %s" % ldpath_str)
|
||||||
print("** ")
|
print("** ")
|
||||||
print("** Run 'ldconfig' or place this line: ")
|
print("** Run 'ldconfig' or place this line: ")
|
||||||
print("** export %s=%s" % (ldpath_str, "%s/usr/local/lib"
|
print("** export %s=%s" % (ldpath_str, "%s"
|
||||||
% installroot))
|
% installroot))
|
||||||
print("** ")
|
print("** ")
|
||||||
print("** into .bashrc, .profile, or the appropriate shell")
|
print("** into .bashrc, .profile, or the appropriate shell")
|
||||||
|
|||||||
Reference in New Issue
Block a user