#12803 closed defect (fixed)
python25 does not provide a dynamic library
Reported by: | nox@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | mww@…, nox@… | |
Port: |
Description
python2.5-config --libs
talks about a "python2.5" library.
The python2.5-config
script says:
elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() libs.append('-lpython'+pyver) # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): libs.insert(0, '-L' + getvar('LIBPL')) print ' '.join(libs)
As you can see, if python is built with Py_ENABLE_SHARED
set, it should provide a dynamic library.
If not, it should include in the LDFLAGS
the lib/python2.5/config
directory, where lives libpython2.5.a
.
Unfortunately, python25 build system assumes that if you're on Darwin, you're more likely to build Python as a framework, and so it forgets about dynamic library when building it the old-fashioned Unix way.
Finally, Py_ENABLE_SHARED
is set because configure
has been asked to (configure.args --enable-shared
, but the only thing that get changed is that modules are built as bundles.
I've tried writing a patch (attached) about that but it fails when building.
So, we either found a way to build a nice and neat dylib, or we move to framework-style install.
Attachments (3)
Change History (9)
Changed 17 years ago by nox@…
Attachment: | patch-Makefile.pre.in added |
---|
Changed 17 years ago by nox@…
Attachment: | patch-configure added |
---|
comment:1 Changed 17 years ago by nox@…
Changed 17 years ago by nox@…
Attachment: | python25-2.5.1_1.diff added |
---|
comment:2 Changed 17 years ago by nox@…
The Makefile.pre.in
patch now also disable the installation of lib-tk
and sqlite3
directories, as these modules are disabled anyway.
comment:3 Changed 17 years ago by mww@…
I'd like to keep the sqlite3 and lib-tk files in the base installation so we do not have to disable them here and put them into the py25-tkinter.. ports. For the rest (the 95%): Damn good work - I'd say just go and commit them yourself!
comment:4 Changed 17 years ago by nox@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Commited in r29606! I'll try to do something about the sqlite3 and tkinter modules and IDLE.
comment:5 Changed 17 years ago by mdickens@…
There are still issues with python25 (rev 4), with regard to the (lack of) framework and this dylib. Please see ticket:11267, comment#11 .
So, with some more work and a nice patch from the Fink team (I think), I've been able to build and install a dynamic library.
But that's not all there is about this last patch:
altinstall
make target: this target installs the Python interpreter aspython2.5
thus removing the need of patchingMakefile.pre.in
to avoid conflicts with otherpython2*
ports.environ
global array on Darwin.Hope you'll be able to review this bunch of patches easily, otherwise i'll split them up a little.