[Tutor] Python with readline
Erik Price
erikprice@mac.com
Tue, 23 Apr 2002 07:41:46 -0400
On Wednesday, April 17, 2002, at 11:53 PM, dman wrote:
> No .so files? They are always named libfoo.so, where 'foo' is the name
> of the library.
Not any that I could see.
> | And I believe my readline library is /sw/include/readline (if the /sw/
> | dir looks unfamiliar, it's the equivalent of /usr/local/ used by Fink,
> | the Unix ported package management app for Mac OS X).
>
> The .h is the "include" file. It is C source that is required for
> compiling anything that uses the library. The .so file is the "shared
> library" file. It is the already-compiled implementation of the
> library. The app (python in your case) will be dynamically linked
> against that .so when it runs.
Useful knowledge. Why does it need to be source code -- couldn't this
information just be placed into the shared library (.so) file?
> Stuff in /usr/share is typically just arbitrary data the app/lib uses
> as it runs.
Someone told me that the "setup.py" script automatically checks for the
presence of GNU Readline. I didn't even know about this script, I
assumed that all you do is ./configure; make; make install. So I looked
at it, and then I looked at the ./configure script. Nope, setup.py does
not appear to be called by ./configure (although I would have assumed it
was). So I need to run setup.py myself. This is interesting for two
reasons --
1) setup.py is not an executable. No reason it should be, but then,
doesn't that assume that I have a working version of Python on my
system? Otherwise this "setup" script wouldn't work. Fortunately I do,
but if this was my first time building Python... well, it just seems
strange.
2) the interface is not readily apparent. Although running "python
setup.py --help" does display a list of options, it does not display a
list of COMMANDS that need to be given (as arguments?) with the setup.py
script. I didn't actually get a chance to look at the source code yet,
to see if I can figure out what I'm supposed to do, but perhaps someone
on this list is more familiar with setup.py and can tell me what I
should be doing.
TIA,
Erik