[ python-Bugs-1579029 ] --disable-sunaudiodev --disable-tk does not work

2006-11-23 Thread SourceForge.net
Bugs item #1579029, was opened at 2006-10-17 17:03
Message generated for change (Comment added) made by thurnerrupert
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579029&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.5
Status: Open
Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: ThurnerRupert (thurnerrupert)
Assigned to: Martin v. Löwis (loewis)
Summary: --disable-sunaudiodev --disable-tk does not work

Initial Comment:
trying to disable sunaudiodev and tk does not really 
work in solaris.

./configure --prefix=/usr/local/Python-2.5 --enable-
shared --disable-sunaudiodev --disable-tk

building 'sunaudiodev' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -
Wstrict-prototypes -I. -I/usr/local/Python-
2.5/./Include -I/cs/ecms/2.0.0/include -I./Include -
I. -I/usr/local/include -I/usr/local/Python-
2.5/Include -I/usr/local/Python-2.5 -
c /usr/local/Python-2.5/Modules/sunaudiodev.c -o 
build/temp.solaris-2.8-sun4u-2.5/usr/local/Python-
2.5/Modules/sunaudiodev.o
/usr/local/Python-2.5/Modules/sunaudiodev.c:20:25: 
sun/audioio.h: No such file or directory

building '_tkinter' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -
Wstrict-prototypes -DWITH_APPINIT=1 -
I/usr/openwin/include -I. -I/usr/local/Python-
2.5/./Include -I/cs/ecms/2.0.0/include -I./Include -
I. -I/usr/local/include -I/usr/local/Python-
2.5/Include -I/usr/local/Python-2.5 -
c /usr/local/Python-2.5/Modules/_tkinter.c -o 
build/temp.solaris-2.8-sun4u-2.5/usr/local/Python-
2.5/Modules/_tkinter.o
In file included from /usr/local/Python-
2.5/Modules/_tkinter.c:67:
/usr/local/include/tk.h:96:23: X11/Xlib.h: No such 
file or directory
In file included from /usr/local/Python-
2.5/Modules/_tkinter.c:67:
/usr/local/include/tk.h:572: error: syntax error 
before "Window"
/usr/local/include/tk.h:572: error: `Window' declared 
as function returning a function
/usr/local/include/tk.h:575: error: syntax error 
before "XEvent"
/usr/local/include/tk.h:584: error: syntax error 
before "Tk_ClassCreateProc"
/usr/local/include/tk.h:592: error: syntax error 
before '}' token
/usr/local/include/tk.h:678: error: syntax error 
before "Bool"

is it possible to correct this or state clearly in 
the configure options how to disable it correctly?

we also checked the Modules/Setup and both seems 
commented.


--

>Comment By: ThurnerRupert (thurnerrupert)
Date: 2006-11-23 09:20

Message:
Logged In: YES 
user_id=1597584
Originator: YES

which header files do you mean? the sun/audioio.h header file e.g. is not
there, but standard sun header files of course are there.

it is though possible to get a running python. but i'm unsure what works
and what not, so you could classify it as "cleanup" too, if you prefer.


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-22 22:53

Message:
Logged In: YES 
user_id=21627
Originator: NO

You still haven't demonstrated a problem. Compiling Python produces some
error messages, sure, but does the resulting Python binary actually work
or not?

If it works, what is the problem? That you appreciate not to see error
messages does not make it a bug.

You cannot build Python *at all* with just the standard gnu from
sunfreeware.com. You do need system header files, and those are not
provided by GCC. So if you have header files, where did you get them from?

--

Comment By: ThurnerRupert (thurnerrupert)
Date: 2006-11-22 12:50

Message:
Logged In: YES 
user_id=1597584
Originator: YES

may i open it again? 

there is a lot of builds on solaris without the core development
environment, so assuming it is there is erronous.

e.g. we build everything with standard gnu from e.g. sunfreeware.com.




--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-19 09:15

Message:
Logged In: YES 
user_id=21627
Originator: NO

Closing as "won't fix". There are no plans to implement 
--disable-sunaudiodev --disable-tk options to configure.

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-06 18:51

Message:
Logged In: YES 
user_id=21627

The component isn't vital. It shouldn't be relevant for 
building sunaudiodev whether an audio device is present in
the system, as this device isn't necessary for *building*
Python. Instead, presence of /usr/include/sys/audioio.h
is necessary. I'm puzzled that this file isn't there (it
is part of the core development environment, AFAIK); the
build process assumes that the header is present if the
system name is "sunos5".

---

[ python-Bugs-1601607 ] using python extension(wxPython) in c

2006-11-23 Thread SourceForge.net
Bugs item #1601607, was opened at 2006-11-23 08:52
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601607&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: jolleydtan (jolleydtan)
Assigned to: Nobody/Anonymous (nobody)
Summary: using python extension(wxPython) in c 

Initial Comment:
hello,all.
 i am confronting with a weird problem, almost forcing to die,the feeling 
is miserable, so pls help me.
here is a python application named "helloWorld",a simple gui application, 
assisted with wxPython.
from wxPython.wx import *
class myApp(wxApp):
  def OnInit(self):
frame = wxFrame(NULL,-1,"hello,world!");
frame.Show(true)
self.SetTopWindow(frame)
return true
app = myApp()
app.MainLoop()

also sorry for my unsmart code, which i should import wx not wxPython.wx.

and i want to use the simplest way to combine with c.so i use:
#include "python.h"
#include "wx/wxPython/wxPython.h"
#include 
using namespace std;

int main()
{
  Py_Initialize();
  if(!Py_IsInitialized())
  {
cerr << "hello,world!"<< endl;
return -1;
  }
  PyRun_SimpleString("from wxPython.wx import *");
  PyRun_SimpleString("class myApp(wxApp):");
  PyRun_SimpleString(" def OnInit(self):");
  PyRun_SimpleString("  frame = wxFrame(NULL,-1,"hello,world!")");
  PyRun_SimpleString("  frame.Show(true)");
  PyRun_SimpleString("  self.SetTopWindow(frame)");
  PyRun_SimpleString("  return true");
  PyRun_SimpleString("app = myApp()");
  PyRun_SimpleString("app.MainLoop()");
  Py_Finalize();
  return 0;
}
in addition, to make this work, i have configure something like this:
add the wxpython include/library files in vc.
includes:
c:\wxPython-src-2.6.3.3\wxPython\include.
c:\python24\include\wx(it is the product of building wxPython)
also the python include here.
c:\python24\include
libraries:
c:\wxPython-src-2.6.3.3\lib\vc_dll(the build product of wxWidgets)
c:\wxPython-src-2.6.3.3\wxPython\wxPython
c:\python24\libs
to supplement the problem, i install wxPython from source code,and i have 
gotten three files,all of which will be uploaded here.

and both them can pass the build process,but get "detected memory leaks  and 
dump objects"in the run process.
i figure that it has great memory leaks when loading certain symbols,like 
wxmsw26ud.lib or such,while other lib are not loaded "no symbol loaded!"

but i donot know why, and donot know how to build a wxPython script within c.
here is the error message:
Detected memory leaks!
Dumping objects ->
{6417} normal block at 0x01B72B30, 262144 bytes long.
 Data: <> CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{6339} normal block at 0x01B0A9C8, 480 bytes long.
 Data: <@_  > 00 00 01 D0 FB FB FB FB 40 5F AD 01 20 92 AD 01 
{6338} normal block at 0x01B0A7D0, 440 bytes long.
.
{48} normal block at 0x003F2C88, 64 bytes long.
 Data:  68 00 A4 00 08 20 A9 00 68 00 B4 00 B8 11 B8 00 
{47} normal block at 0x00A40068, 262144 bytes long.
 Data: <> CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{45} normal block at 0x003F4F10, 12 bytes long.
 Data: <> FF FF FF FF 00 00 00 00 C0 07 00 00 
Object dump complete.
The thread 'Win32 Thread' (0x9ec) has exited with code 0 (0x0).
The program '[2960] wxPythonGUI.exe: Native' has exited with code 0 (0x0).

thanks one billion times if someone can tell me,coz the progress should be 
advanced further.and all my other people awaits it.
regards,
jolley.d.tan








--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601607&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1601630 ] getopt Documentation improvement

2006-11-23 Thread SourceForge.net
Bugs item #1601630, was opened at 2006-11-23 09:39
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Thomas Guettler (guettli)
Assigned to: Nobody/Anonymous (nobody)
Summary: getopt Documentation improvement

Initial Comment:
Hi,

I think the documentation of getopt could be
improved 

The example at the buttom:
http://docs.python.org/lib/module-getopt.html

1. Print str(exc)
except getopt.GetoptError, exc:
print str(exc)
usage()

2. In the loop: use elif and else

for o, a in opts:
if o == "-v":
verbose = True
elif o in ("-h", "--help"):
usage()
sys.exit()
else:
raise AssertionError(
"Unparsed Paremter: %s %s" %(o, a))

3. I would support --verbose, too



--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1601630 ] getopt Documentation improvement

2006-11-23 Thread SourceForge.net
Bugs item #1601630, was opened at 2006-11-23 09:39
Message generated for change (Comment added) made by gbrandl
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Documentation
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Thomas Guettler (guettli)
>Assigned to: Georg Brandl (gbrandl)
Summary: getopt Documentation improvement

Initial Comment:
Hi,

I think the documentation of getopt could be
improved 

The example at the buttom:
http://docs.python.org/lib/module-getopt.html

1. Print str(exc)
except getopt.GetoptError, exc:
print str(exc)
usage()

2. In the loop: use elif and else

for o, a in opts:
if o == "-v":
verbose = True
elif o in ("-h", "--help"):
usage()
sys.exit()
else:
raise AssertionError(
"Unparsed Paremter: %s %s" %(o, a))

3. I would support --verbose, too



--

>Comment By: Georg Brandl (gbrandl)
Date: 2006-11-23 09:55

Message:
Logged In: YES 
user_id=849994
Originator: NO

Thanks, committed something along your lines in rev. 52833, 52834 (2.5).

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601630&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1579029 ] --disable-sunaudiodev --disable-tk does not work

2006-11-23 Thread SourceForge.net
Bugs item #1579029, was opened at 2006-10-17 17:03
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1579029&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.5
Status: Open
Resolution: Wont Fix
Priority: 5
Private: No
Submitted By: ThurnerRupert (thurnerrupert)
Assigned to: Martin v. Löwis (loewis)
Summary: --disable-sunaudiodev --disable-tk does not work

Initial Comment:
trying to disable sunaudiodev and tk does not really 
work in solaris.

./configure --prefix=/usr/local/Python-2.5 --enable-
shared --disable-sunaudiodev --disable-tk

building 'sunaudiodev' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -
Wstrict-prototypes -I. -I/usr/local/Python-
2.5/./Include -I/cs/ecms/2.0.0/include -I./Include -
I. -I/usr/local/include -I/usr/local/Python-
2.5/Include -I/usr/local/Python-2.5 -
c /usr/local/Python-2.5/Modules/sunaudiodev.c -o 
build/temp.solaris-2.8-sun4u-2.5/usr/local/Python-
2.5/Modules/sunaudiodev.o
/usr/local/Python-2.5/Modules/sunaudiodev.c:20:25: 
sun/audioio.h: No such file or directory

building '_tkinter' extension
gcc -fPIC -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -
Wstrict-prototypes -DWITH_APPINIT=1 -
I/usr/openwin/include -I. -I/usr/local/Python-
2.5/./Include -I/cs/ecms/2.0.0/include -I./Include -
I. -I/usr/local/include -I/usr/local/Python-
2.5/Include -I/usr/local/Python-2.5 -
c /usr/local/Python-2.5/Modules/_tkinter.c -o 
build/temp.solaris-2.8-sun4u-2.5/usr/local/Python-
2.5/Modules/_tkinter.o
In file included from /usr/local/Python-
2.5/Modules/_tkinter.c:67:
/usr/local/include/tk.h:96:23: X11/Xlib.h: No such 
file or directory
In file included from /usr/local/Python-
2.5/Modules/_tkinter.c:67:
/usr/local/include/tk.h:572: error: syntax error 
before "Window"
/usr/local/include/tk.h:572: error: `Window' declared 
as function returning a function
/usr/local/include/tk.h:575: error: syntax error 
before "XEvent"
/usr/local/include/tk.h:584: error: syntax error 
before "Tk_ClassCreateProc"
/usr/local/include/tk.h:592: error: syntax error 
before '}' token
/usr/local/include/tk.h:678: error: syntax error 
before "Bool"

is it possible to correct this or state clearly in 
the configure options how to disable it correctly?

we also checked the Modules/Setup and both seems 
commented.


--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-11-23 18:52

Message:
Logged In: YES 
user_id=21627
Originator: NO

It's not sun/audioio.h that's missing, but (apparently)
/usr/include/sys/audioio.h; this
should have come from the SUNWaudh package (Audio Header Files).

If you want to find out what works and what not, you should run the test
suite.

--

Comment By: ThurnerRupert (thurnerrupert)
Date: 2006-11-23 09:20

Message:
Logged In: YES 
user_id=1597584
Originator: YES

which header files do you mean? the sun/audioio.h header file e.g. is not
there, but standard sun header files of course are there.

it is though possible to get a running python. but i'm unsure what works
and what not, so you could classify it as "cleanup" too, if you prefer.


--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-22 22:53

Message:
Logged In: YES 
user_id=21627
Originator: NO

You still haven't demonstrated a problem. Compiling Python produces some
error messages, sure, but does the resulting Python binary actually work
or not?

If it works, what is the problem? That you appreciate not to see error
messages does not make it a bug.

You cannot build Python *at all* with just the standard gnu from
sunfreeware.com. You do need system header files, and those are not
provided by GCC. So if you have header files, where did you get them from?

--

Comment By: ThurnerRupert (thurnerrupert)
Date: 2006-11-22 12:50

Message:
Logged In: YES 
user_id=1597584
Originator: YES

may i open it again? 

there is a lot of builds on solaris without the core development
environment, so assuming it is there is erronous.

e.g. we build everything with standard gnu from e.g. sunfreeware.com.




--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-19 09:15

Message:
Logged In: YES 
user_id=21627
Originator: NO

Closing as "won't fix". There are no plans to implement 
--disable-sunaudiodev --disable-tk options to configure.

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-06 18:51

Message:
Logged In: YES 
user_id=21627

The component isn't vital. I

[ python-Bugs-1601607 ] using python extension(wxPython) in c

2006-11-23 Thread SourceForge.net
Bugs item #1601607, was opened at 2006-11-23 09:52
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601607&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Extension Modules
Group: Python 2.4
>Status: Closed
>Resolution: Invalid
Priority: 5
Private: No
Submitted By: jolleydtan (jolleydtan)
Assigned to: Nobody/Anonymous (nobody)
Summary: using python extension(wxPython) in c 

Initial Comment:
hello,all.
 i am confronting with a weird problem, almost forcing to die,the feeling 
is miserable, so pls help me.
here is a python application named "helloWorld",a simple gui application, 
assisted with wxPython.
from wxPython.wx import *
class myApp(wxApp):
  def OnInit(self):
frame = wxFrame(NULL,-1,"hello,world!");
frame.Show(true)
self.SetTopWindow(frame)
return true
app = myApp()
app.MainLoop()

also sorry for my unsmart code, which i should import wx not wxPython.wx.

and i want to use the simplest way to combine with c.so i use:
#include "python.h"
#include "wx/wxPython/wxPython.h"
#include 
using namespace std;

int main()
{
  Py_Initialize();
  if(!Py_IsInitialized())
  {
cerr << "hello,world!"<< endl;
return -1;
  }
  PyRun_SimpleString("from wxPython.wx import *");
  PyRun_SimpleString("class myApp(wxApp):");
  PyRun_SimpleString(" def OnInit(self):");
  PyRun_SimpleString("  frame = wxFrame(NULL,-1,"hello,world!")");
  PyRun_SimpleString("  frame.Show(true)");
  PyRun_SimpleString("  self.SetTopWindow(frame)");
  PyRun_SimpleString("  return true");
  PyRun_SimpleString("app = myApp()");
  PyRun_SimpleString("app.MainLoop()");
  Py_Finalize();
  return 0;
}
in addition, to make this work, i have configure something like this:
add the wxpython include/library files in vc.
includes:
c:\wxPython-src-2.6.3.3\wxPython\include.
c:\python24\include\wx(it is the product of building wxPython)
also the python include here.
c:\python24\include
libraries:
c:\wxPython-src-2.6.3.3\lib\vc_dll(the build product of wxWidgets)
c:\wxPython-src-2.6.3.3\wxPython\wxPython
c:\python24\libs
to supplement the problem, i install wxPython from source code,and i have 
gotten three files,all of which will be uploaded here.

and both them can pass the build process,but get "detected memory leaks  and 
dump objects"in the run process.
i figure that it has great memory leaks when loading certain symbols,like 
wxmsw26ud.lib or such,while other lib are not loaded "no symbol loaded!"

but i donot know why, and donot know how to build a wxPython script within c.
here is the error message:
Detected memory leaks!
Dumping objects ->
{6417} normal block at 0x01B72B30, 262144 bytes long.
 Data: <> CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{6339} normal block at 0x01B0A9C8, 480 bytes long.
 Data: <@_  > 00 00 01 D0 FB FB FB FB 40 5F AD 01 20 92 AD 01 
{6338} normal block at 0x01B0A7D0, 440 bytes long.
.
{48} normal block at 0x003F2C88, 64 bytes long.
 Data:  68 00 A4 00 08 20 A9 00 68 00 B4 00 B8 11 B8 00 
{47} normal block at 0x00A40068, 262144 bytes long.
 Data: <> CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD 
{45} normal block at 0x003F4F10, 12 bytes long.
 Data: <> FF FF FF FF 00 00 00 00 C0 07 00 00 
Object dump complete.
The thread 'Win32 Thread' (0x9ec) has exited with code 0 (0x0).
The program '[2960] wxPythonGUI.exe: Native' has exited with code 0 (0x0).

thanks one billion times if someone can tell me,coz the progress should be 
advanced further.and all my other people awaits it.
regards,
jolley.d.tan








--

>Comment By: Martin v. Löwis (loewis)
Date: 2006-11-23 19:02

Message:
Logged In: YES 
user_id=21627
Originator: NO

Please don't use the bug tracker as a means to get support; it is not
meant to be used that way.
Instead, try to get help e.g. on news:comp.lang.python

I can see various errors in your code; as a starting point, check the
result of PyRun_SimpleString.

Closing the report as invalid.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1601607&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[ python-Bugs-1600860 ] --enable-shared links extensions to libpython statically

2006-11-23 Thread SourceForge.net
Bugs item #1600860, was opened at 2006-11-22 00:29
Message generated for change (Comment added) made by gustavo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1600860&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Distutils
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Marien Zwart (marienz)
Assigned to: Nobody/Anonymous (nobody)
Summary: --enable-shared links extensions to libpython statically

Initial Comment:
python 2.5 tries to link extension modules to libpython2.5 if python is 
compiled with --enable-shared (patch #1429775, bug #83279, svn r45232). To do 
this it adds -lpython2.5 and -L$PREFIX/lib/python2.5/config to the link command 
line. -lpython2.5 is fine, however the "config" directory it adds contains a 
static libpython2.5.a library. The libpython2.5.so I think it should be linking 
to is in $PREFIX/lib. The result is even a trivial extension pulls in (nearly) 
all of that library, so you get an extension that is over a megabyte in size 
where older pythons produce one of a few kilobytes.

There is a comment on the referenced bug saying

"""
You can probably rely on libpythonxy.so ending up in
$(DESTDIR)$(LIBDIR)/$(INSTSONAME), whose values you can
retrieve from the installed Makefile (i.e. through
distutils.config).
"""

so I think the patch that got applied does not do what was intended.

--

Comment By: Gustavo J. A. M. Carneiro (gustavo)
Date: 2006-11-23 20:47

Message:
Logged In: YES 
user_id=908
Originator: NO

Hmm.. I think I wrongfully assumed $prefix/lib/pythonX.Y/config contained
a shared python library in addition to the static one.  It seems that was
an Ubuntu specific thing :|

I'll take a good look and fix this within a couple of days...

--

Comment By: Marien Zwart (marienz)
Date: 2006-11-22 13:02

Message:
Logged In: YES 
user_id=857292
Originator: YES

I can reproduce this by using either gentoo's python 2.5 or one I
installed temporarily with ./configure --enable-shared --prefix
$HOME/tmp/pytem, using a trivial distutils extension (I used
http://dev.gentooexperimental.org/~marienz/ext.c and
http://dev.gentooexperimental.org/~marienz/setup.py for testing). The
relevant command that is run is:

gcc -pthread -shared build/temp.linux-i686-2.5/ext.o
-L/home/marienz/tmp/pytem/lib/python2.5/config -lpython2.5 -o
build/lib.linux-i686-2.5/ext.so

for the manually-configured python and something similar for gentoo's
python. The code doing the adding was added by r45232 in svn. From the
diff (svn di -r45231:45232
http://svn.python.org/projects/python/trunk/Lib/distutils/command/build_ext.py)
with some extra context added:

-if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos':
+if sys.platform[:6] == 'cygwin' or sys.platform[:6] == 'atheos'
or \
+   (sys.platform.startswith('linux') and
+sysconfig.get_config_var('Py_ENABLE_SHARED')):
 if string.find(sys.executable, sys.exec_prefix) != -1:
 # building third party extensions
 self.library_dirs.append(os.path.join(sys.prefix, "lib",
  "python" +
get_python_version(),
  "config"))

(that is around line 188 of Lib/distutils/command/build_ext.py)

sys.platform on this host is linux2 and as far as I can tell
Py_ENABLE_SHARED is true if --enable-shared is passed to configure.

If you need any more information please ask.

--

Comment By: Martin v. Löwis (loewis)
Date: 2006-11-22 07:09

Message:
Logged In: YES 
user_id=21627
Originator: NO

I can't reproduce the problem. Why do you think
-L$PREFIX/lib/python2.5/config is added to the link command line? AFAICT,
it never is.

What operating system are you using?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1600860&group_id=5470
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com