Yes, that was my thinking as well - something like configure does
(autotools) where it will tell you some details after calling it
(although in this case the output is after install).
Sounds good!
Patrick
Mahadev Konar wrote:
I would suggest adding it to the readme no? Modifying /etc files with sudo
access could be dangerous and we might mess up somethings. Would it be good
to add a print statement in the setup saying that you might need to do edit
/etc/ld.so.conf and run /sbin/ldconfig in case of Fedora?
So the users would see the statement after running setup.py?
Thanks
mahadev
On 11/23/09 6:25 PM, "Erik Holstad" <erikhols...@gmail.com> wrote:
Have been messing around to try to get it included in the setup.py script.
But not sure
if it is good to have it there since writing to /usr/ld.so.conf and
reloading the /sbin/ldconfig
requires sudo status. But on the other hand that is needed to install from
the beginning.
I could add something like this to the end of the setup file
print "Setting up dependencies"
try:
f = open("/etc/ld.so.conf", 'r+')
content = f.read()
path = "/usr/local/lib"
if content.find(path) == -1:
f.write(path)
except Exception, e:
pass
import subprocess
subprocess.call(['sudo', '/sbin/ldconfig'])
Erik