-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Great! It sounds like python bindings might be easy to implement once the maintainer is back (and has cleared his plate of other stuff).
Fink tries to flush the user environment before a build, so I don't think your PATH necessarily had an influence here--configure scripts are quite happy to find items under /usr. The canonical way to do the symlink that you did is to install Fink's "python" package, which sets /sw/bin/python to point to the latest version python available in Fink (currently 2.5, so /sw/bin/python -> /sw/bin/python2.5). But that's not really how we typically do it. We're not going to support a third-party python update, so any python bindings for this package are going to have to use a Fink python (or possibly the system's). How this will happen depends on how the package generates its python bindings. It may be just as simple as running the script the package uses manually, changing "python" to, say, "/sw/bin/python2.5". Frequently such packages support multiple python versions. If needed, it's not a problem to set environment variables for the build, or patch files to do the right thing. Brendan Simon wrote: > I managed to get net-snmp-unified built and installed with the python > bindings. > My quick test seems to work. Followed some simple python code tutorial > to do an snmpwalk on sysDescr and python did not complain. > > I'm sure my fixes aren't generic enough for everyone, but this is what I > had to do. > > My problem was that configure was looking for "python" via the > AC_PATH_PROG macro and the variable PYTHON was being set to > /usr/bin/python for two reasons. > 1. MacPython prepened it's path to my PATH environment vairable, > presumably because I installed MacPython after I installed fink. > 2. /sw/bin/python did not exist. Only /sw/bin/python2.5 existed. > > I resolved these problems by. > 1. Manually setting the PATH variable in my build shell to remove the > MacPython bin directory. > 2. Added a symlink /sw/bin/python -> /sw/bin/python2.5 > > Oh, yeah, also changed configure argument "--without-python-modules" to > "--with-python-modules" in net-snmp-unified.info > > > So, for a more robust solution, we need to find a way to determine which > version of python is to be used and whether setuptools is installed. > Is MacPython a valid candidate for net-snmp-unified python modules and > the fink installed setuptools ? > If not, then can we force configure to search /sw/bin first ? The > AC_PATH_PROG macro has a field to modify the path variable so that could > be used. > > Hope all that helps. I'm happy to try out any maintainer originated > changes. > Cheers, Brendan. > > > > Brendan Simon wrote: >> I am trying to compile net-snmp-unified with the python bindings. >> >> The python bindings require setuptools which I have installed using >> "fink -y install setuptools-py25". It installs successfully, but the >> net-snmp install fails because python can't load the module. >> >> /usr/bin/python is a symlink to /usr/bin/python2.3 which is a symlink >> to /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python >> >> If i execute /usr/bin/python (or just python) and then type "from >> setuptools import setup" I get the following error. >> ImportError: No module named setuptools >> >> >> If I execute /sw/bin/python2.5 and type "from setuptools import setup" >> then I just get the prompt returned, meaning things imported ok. >> >> How do I get the build of net-snmp to use the correct python executable. >> >> Thanks, Brendan. >> >> -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHcSJvB8UpO3rKjQ8RAqIkAJ9i5GZZfPZsbK+u5izMLRPBJBqkEgCfRSnC ldSNjW7yxmxihXEdes3qXvA= =Hs2f -----END PGP SIGNATURE----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-users