Movatterモバイル変換
[0]ホーム
[Python-Dev] Where is this flag coming from?
Barry A. Warsawbarry@python.org
Wed, 9 Oct 2002 14:18:40 -0400
>>>>> "TR" == Tim Rice <tim@multitalents.net> writes: TR> It gets tricky trying to automagicly use the -R flag. As an TR> example, the default install dir for OpenSSL is TR> /usr/local/ssl. So on platforms that support -R you would TR> think you could use -L/usr/local/ssl/lib -R/usr/local/ssl/lib TR> -lssl -lcrypto OpenUNIX supports -R but if you did not build TR> shared libraries for OpenSSL, the -R/usr/local/ssl/lib will TR> break the build.Since there seems to be so little agreement among *nixes about how todo this, it seems like the only/best place to codify all thisknowledge is in distutils. I still think specifyingruntime_library_dirs to the Extension constructor is the right thingto do. But maybe on some systems distutils ought to ignore it, or atleast check to make sure that the dynamic libraries it wants to linkagainst are actually present. TR> Then there is the whole issue of what non system dirs to TR> include. Maybe you have OpenSSL 0.9.6g in /usr/local/ssl but TR> you're testing 0.9.7 that's installed in some other dir. If TR> setup.py automagicly adds ssl to build the '_socket' TR> extension, how does it know which version to use? How would it TR> even find the one not in /usr/local/ssl? Normally you would TR> configure --with-ssl-dir=/some_path_to_sslI would hope that setup.py would match the library version with theheader version, but I'm sure it's not easy or foolproof. Look at themachinations setup.py goes through to build bsddbmodule. I stillthink it's best to do this so that Python has a chance of building outof the box for the widest possible audience. It's impossible to get100% right. TR> As one who has done ports to many Open Source projects, I TR> found python one of the more difficult ones because the build TR> process uses python. So for a new platform (or broken build) TR> you have to know python to build python.Python's also a pretty complicated piece of software, what with eachextension module linking against non-standard libraries presenting itsown set of complications. But what tool that you can portably counton being present would you use instead?-Barry
[8]ページ先頭