[Pythonmac-SIG] Another build question: ssl?
Dan Wolfe
dkwolfe@pacbell.net
Fri, 22 Nov 2002 11:08:20 -0800
On Friday, November 22, 2002, at 05:09 AM, Andrew Kuchling wrote:
>> In the code below, if I'm reading this right, if the file is found and
>> the path appears in both the std_dir and paths parameters, it will
>> return a directory instead of the current code's full path the the
>
> This is an actual bug in my suggested code; I'll fix it before I try
> it. Thanks for pointing it out.
You're welcome..
>> And the other distutils question that I had, is whether the code needs
>> to be backwardly compatible or not... (eg is it ok to use the new
>> string.startswith() and += operatives?) for use with python 2.1?
>
> The Distutils is just the code under Lib/distutils/. That's released
> independently of Python, and for now it needs to stay compatible with
> 1.5.2.
>
> The setup.py is part of Python's build system, and it only needs to
> run with the version of Python it comes with.
Thanks for the explanation. Now for the questions since you seem to
understand distutils more than me...
1) Since setup.py isn't part of distutils, is there any reason to keep
the setup.py find_library_file()? With the only difference being
splitting the additional paths from the std_dirs, and returning a
directory if found on the paths, it doesn't make a lot of sense -
especially since only ssl and waste appear to use this function and
neither check for the possibility of a directory being returned...
Unless there's another reason, we can simply do the following...
- ssl_libs = find_library_file(self.compiler,ssl, lib_dirs,
['/usr/local/ssl/lib','/usr/contrib/ssl/lib'])
+ ssl_libs = self.compiler.find_library_file(lib_dirs+
['/usr/local/ssl/lib','/usr/contrib/ssl/lib'], 'ssl')
and
- waste_libs = find_library_file(self.compiler, "WASTE", [],
["../waste/Static Libraries"])
+ waste_libs = self.compiler.find_library_file(["../waste/Static
Libraries"], "WASTE", )
and eliminate the entire find_library_file function from the setup.py
file.
2) Is there any reason in particular that fine_file() function returns
a directory if found on the additional paths parameter? None of the
setup.py uses of it seem to make any usage of the additional
information - some - like the lzip library and find_module_name() for
example just seem to reconstruct the path... from a distutil newbie's
perspective, it seems like this is a latent bug just waiting to happen
because a directory was return instead of a path to the file... of
course it could just be that it then includes the entire directory
instead....
oooh I need another cup of coffee. ;-)
- Dan