[Pythonmac-SIG] distutils/swig - Loaded module does not contain symbol...

2005-04-03 Thread Larry Bugbee
I'm stuck.  I'm trying to make a Python extension from some relatively 
simple code written in C.  I created a setup.py and built the module.  
Upon importing, I keep getting an ImportError.  I built and got the 
same error with both python 2.3 and 2.4.1.  (I am running 10.3.8.  swig 
is 1.3.24.  gcc is 3.3.)

Going back to basics I created an even simpler test case with the same 
results.

arith.c
===
int add(int a, int b) {
return a+b;
}
arith.i
===
%module arith
int add(int a, int b);
setup.py

import distutils
from distutils.core import setup, Extension
setup(name = 'arith',
  version = '1.0',
  ext_modules = [Extension('arith', ['arith.i', 'arith.c'])])
python setup.py install
>>>import arith
The error message...
  ImportError: Loaded module does not contain symbol _initarith
Perhaps you have a suggestion?
Tx, Larry
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] distutils/swig - Loaded module does not contain symbol...

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 4:12 AM, Larry Bugbee wrote:
I'm stuck.  I'm trying to make a Python extension from some relatively 
simple code written in C.  I created a setup.py and built the module.  
Upon importing, I keep getting an ImportError.  I built and got the 
same error with both python 2.3 and 2.4.1.  (I am running 10.3.8.  
swig is 1.3.24.  gcc is 3.3.)

Going back to basics I created an even simpler test case with the same 
results.

arith.c
===
int add(int a, int b) {
return a+b;
}
arith.i
===
%module arith
int add(int a, int b);
setup.py

import distutils
from distutils.core import setup, Extension
setup(name = 'arith',
  version = '1.0',
  ext_modules = [Extension('arith', ['arith.i', 'arith.c'])])
python setup.py install
>>>import arith
from distutils.core import setup, Extension
setup(
name='arith',
version='1.0',
ext_modules=[
# swig generates arith.py -- so extension is _arith.so
Extension('_arith', ['arith.i', 'arith.c']),
],
)
-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] distutils/swig - Loaded module does not contain symbol...

2005-04-03 Thread Larry Bugbee
Thanks Bob!  ...that combined with arith.py not being copied to 
site-package.

Which raises another question, ought not arith.py be copied and if so, 
a bug?

Anyway, much appreciated.  I'm off and running again.  Thanks.
Larry
On Apr 3, 2005, at 12:55 AM, Bob Ippolito wrote:
On Apr 3, 2005, at 4:12 AM, Larry Bugbee wrote:
I'm stuck.  I'm trying to make a Python extension from some 
relatively simple code written in C.  I created a setup.py and built 
the module.  Upon importing, I keep getting an ImportError.  I built 
and got the same error with both python 2.3 and 2.4.1.  (I am running 
10.3.8.  swig is 1.3.24.  gcc is 3.3.)

Going back to basics I created an even simpler test case with the 
same results.

arith.c
===
int add(int a, int b) {
return a+b;
}
arith.i
===
%module arith
int add(int a, int b);
setup.py

import distutils
from distutils.core import setup, Extension
setup(name = 'arith',
  version = '1.0',
  ext_modules = [Extension('arith', ['arith.i', 'arith.c'])])
python setup.py install
>>>import arith
from distutils.core import setup, Extension
setup(
name='arith',
version='1.0',
ext_modules=[
# swig generates arith.py -- so extension is _arith.so
Extension('_arith', ['arith.i', 'arith.c']),
],
)
-bob

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] distutils/swig - Loaded module does not contain symbol...

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 5:19 AM, Larry Bugbee wrote:
On Apr 3, 2005, at 12:55 AM, Bob Ippolito wrote:
On Apr 3, 2005, at 4:12 AM, Larry Bugbee wrote:
I'm stuck.  I'm trying to make a Python extension from some 
relatively simple code written in C.  I created a setup.py and built 
the module.  Upon importing, I keep getting an ImportError.  I built 
and got the same error with both python 2.3 and 2.4.1.  (I am 
running 10.3.8.  swig is 1.3.24.  gcc is 3.3.)

Going back to basics I created an even simpler test case with the 
same results.

arith.c
===
int add(int a, int b) {
return a+b;
}
arith.i
===
%module arith
int add(int a, int b);
setup.py

import distutils
from distutils.core import setup, Extension
setup(name = 'arith',
  version = '1.0',
  ext_modules = [Extension('arith', ['arith.i', 'arith.c'])])
python setup.py install
>>>import arith
from distutils.core import setup, Extension
setup(
name='arith',
version='1.0',
ext_modules=[
# swig generates arith.py -- so extension is _arith.so
Extension('_arith', ['arith.i', 'arith.c']),
],
)
Thanks Bob!  ...that combined with arith.py not being copied to 
site-package.

Which raises another question, ought not arith.py be copied and if so, 
a bug?

Anyway, much appreciated.  I'm off and running again.  Thanks.
You have to specify that as well, of course.  I forget what the setup 
kwarg is for plain modules, though.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] distutils/swig - Loaded module does not contain symbol...

2005-04-03 Thread Larry Bugbee
A bug perhaps?
Poking around some more I think I see now what was happening.  
distutils is not automagically copying the swig generated arith.py 
unless it is there from a previous build (residue).

After deleting all residue so that it looks like a 1st time build
If I attempt a build and install as a single step
python setup.py install
arith.py is not copied.  If I do it in two steps
python setup.py build
python setup.py install
it works.
Other args like 'packages' and 'py_modules' don't change this basic 
behavior.

Is someone in a position to confirm these findings?  ...and then 
perhaps a bug report?

Again Bob, my thanks.
Larry
On Apr 3, 2005, at 11:06 AM, Bob Ippolito wrote:
On Apr 3, 2005, at 5:19 AM, Larry Bugbee wrote:
On Apr 3, 2005, at 12:55 AM, Bob Ippolito wrote:
On Apr 3, 2005, at 4:12 AM, Larry Bugbee wrote:
I'm stuck.  I'm trying to make a Python extension from some 
relatively simple code written in C.  I created a setup.py and 
built the module.  Upon importing, I keep getting an ImportError.  
I built and got the same error with both python 2.3 and 2.4.1.  (I 
am running 10.3.8.  swig is 1.3.24.  gcc is 3.3.)

Going back to basics I created an even simpler test case with the 
same results.

arith.c
===
int add(int a, int b) {
return a+b;
}
arith.i
===
%module arith
int add(int a, int b);
setup.py

import distutils
from distutils.core import setup, Extension
setup(name = 'arith',
  version = '1.0',
  ext_modules = [Extension('arith', ['arith.i', 'arith.c'])])
python setup.py install
>>>import arith
from distutils.core import setup, Extension
setup(
name='arith',
version='1.0',
ext_modules=[
# swig generates arith.py -- so extension is _arith.so
Extension('_arith', ['arith.i', 'arith.c']),
],
)
Thanks Bob!  ...that combined with arith.py not being copied to 
site-package.

Which raises another question, ought not arith.py be copied and if 
so, a bug?

Anyway, much appreciated.  I'm off and running again.  Thanks.
You have to specify that as well, of course.  I forget what the setup 
kwarg is for plain modules, though.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] readline space problem?

2005-04-03 Thread John Hunter

Bob> Then either it's a bug in readline, or you have some kind of
Bob> local configuration problem.  If you search around the Fink
Bob> project and find out that they're applying any patches, let
Bob> me know and I'll see if I can do something, but I'm not going
Bob> to research this further on my own.

Hi Bob,

Just wanted to update you on this.  Fernando took a deeper look at
this, and found that a readline macro needs to be set at compile time
to prevent the space from being inserted.  This is normally set by the
python configure, which apparently apple does not use

   define_macros=[('HAVE_RL_COMPLETION_APPEND_CHARACTER', None)],

The complete post is below.  Thanks for taking a look at this.

JDH


From: Fernando Perez <[EMAIL PROTECTED]>
Subject: Re: [IPython-user] Re: OSX tab completion
To: Robert Kern <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED]
Date: Fri, 01 Apr 2005 19:03:27 -0700
Organization: Applied Mathematics, University of Colorado at Boulder

Robert Kern wrote:

>> Robert, does this mean you also have the same problem?  I didn't
>> realize that this was a widespread OSX issue.  If someone has a
>> definitive solution/answer to this, please let me know so I can add
>> this information to the user's guide for future reference.
> Yes, I have the same problem. I am using my own build of readline
> 5.0. Unless I get more info very soon, this is also the build that
> will be in MacEnthon.

OK, this is definitely controlled by the python build of readline.c.
Here are some pointers.  From the Gnu readline manual at

http://cnswww.cns.cwru.edu/~chet/readline/readline.html,

I found this note:

Variable: int rl_completion_append_character
 When a single completion alternative matches at the end of the
command line, this character is appended to the inserted completion
text. The default is a space character (` '). Setting this to the null
character (`\0') prevents anything being appended automatically. This
can be changed in application-specific completion functions to provide
the "most sensible word separator character" according to an
application-specific command line syntax specification.

Indeed, in the Python 2.4.1 source tree, in Modules/readline.c, around
line 717 we find:

#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
 rl_completion_append_character ='\0';
#endif


Now, a grep of the whole source tree reveals:

planck[Python-2.4.1]> egrep -rn HAVE_RL_COMPLETION_APPEND_CHARACTER *
configure:19433:#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
configure.in:2861:  AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
Modules/readline.c:487:#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
Modules/readline.c:579:#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
Modules/readline.c:716:#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
Modules/readline.c:858:#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
pyconfig.h.in:375:#undef HAVE_RL_COMPLETION_APPEND_CHARACTER


So what appears to occur is that under OSX, for whatever reason,
configure is NOT defining the HAVE_RL_COMPLETION_APPEND_CHARACTER
macro, and hence the rl_completion_append_character is never reset to
'\0'.  In this case, as indicated above, the readline library will
default to appending a space.

With this info, it should be possible to track down why under OSX (at
least under certain builds), the HAVE_RL_COMPLETION_APPEND_CHARACTER
macro is not being defined.  Worse case, you could just modify
readline.c to make the above change unconditionally, without worrying
about this macro (just strip the ifdef/endif).

Note that this variable is NOT exposed publically by the python
readline API, so this has to be fixed at build time, you can't reset
it later at runtime via any kind of user setting (at least not that I
can see).

I hope this helps some.

Best,

f

___
IPython-user mailing list
[EMAIL PROTECTED]
http://scipy.net/mailman/listinfo/ipython-user



___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] readline space problem?

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 5:31 PM, John Hunter wrote:
Bob> Then either it's a bug in readline, or you have some kind of
Bob> local configuration problem.  If you search around the Fink
Bob> project and find out that they're applying any patches, let
Bob> me know and I'll see if I can do something, but I'm not going
Bob> to research this further on my own.
Just wanted to update you on this.  Fernando took a deeper look at
this, and found that a readline macro needs to be set at compile time
to prevent the space from being inserted.  This is normally set by the
python configure, which apparently apple does not use
   define_macros=[('HAVE_RL_COMPLETION_APPEND_CHARACTER', None)],
Again, Apple did not do anything.  readline is *not part of OS X*, so 
it can't possibly be their fault.

This problem would be the fault of whomever built the extension, out of 
tree... in this case, either Jack or me, depending on where you got it 
from.

Unfortunately I won't get around to fixing this for a while, but the 
Python 2.4.1 distribution  I built 
comes with a readline extension built at the same time as Python, so it 
should work fine.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] Embedding with CW6

2005-04-03 Thread Jack Jansen
On 24-mrt-05, at 14:28, Steve Spicklemire wrote:
Hi Folks,
Back in the pretty old days (python 1.5 or so I think) I developed a 
Macromedia Director (MMD) scripting Xtra that allowed Lingo scripts to 
use python as an embedded language. It worked great... but I moved on 
and haven't done anything Carbon in years. Now I find myself in a 
situation where I need to get that Xtra working with the latest MMD. 
The Macromedia XDK seems to only support Codewarrior on the Mac. I 
have only CW6 at this point (I have an email sent off to Metrowerks 
asking how I might get CW7) so I guess I can't build the latest 
sources (as they seem to want CW7). So.. the question is: What's the 
latest set of sources that will likely work on CW6? (in case I can't 
get CW7).
It's difficult to tell (I have to work from the log messages, and 
compare checkins to release tags), but it seems I made the switch from 
CW6 to CW7 in December 2001. The log messages seem to suggest that 2.2 
was released with CW7. So that means 2.1 is the last version that'll 
build with CW6...
--
Jack Jansen, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman

___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] MacEnthon 0.0 testing release

2005-04-03 Thread Robert Kern
I am pleased to announce the availability of MacEnthon 0.0!
MacEnthon is the OS X counterpart to the popular "Enthought Edition" of 
Python: a convenient bundling of a number of packages geared for the 
scientific community. Right now, it targets the Apple-installed Python 
2.3.0. Once I am satisfied with this release, I will consider cutting a 
release for Python 2.4.1. This is currently just a test release. Please 
do not tell newbies to go install it, yet.

For a full list of packages, please see the ReadMe:
  http://download.enthought.com/MacEnthon/ReadMe.html
To download:
  http://download.enthought.com/MacEnthon/MacEnthon-0.0.dmg
Included is a CLI uninstaller, enthonbegone.py . It may leave a few 
empty directories hanging about, but otherwise it works fairly well. See 
its help for more information.

When you encounter problems, packaging/build bugs, or missing 
documentation, please log it on the Enthon issue tracker and assign the 
issue to "rkern":

  https://www.enthought.com/roundup/enthon/
Thank you all.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] MacEnthon 0.0 testing release

2005-04-03 Thread Robert Kern
Robert Kern wrote:
I am pleased to announce the availability of MacEnthon 0.0!
I should add that the disk image is 158 MiB large and that the installed 
files take up... I'm not actually sure, but it's under 700 MiB, I believe.

Zip archives of individual packages will be available when I get around 
to it.

--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 21:03, OpenMacNews wrote:
i've originally posted this on python-list -- but I have a suspicion 
my questions may have to do with Mac-specific issues, so I'll try here 
as well ...

i've successfully built Python-2.4.1 from src on OSX 10.3.8 as a 
framework install with, simply:

   ./configure \
   --enable-framework \
   --with-threads \
   --with-cxx=g++ \
   --enable-ipv6 \
   --enable-toolbox-glue
   make frameworkinstall
i'm next attempting to build same but linking against an external 
instance of libxml2 (v2.6.18) installed in /usr/local ...

i've tried the ususal combinations of setting LDFLAGS and/or assigning 
--with-libs (="/usr/local/lib/libxml2.2.6.18.dylib"), to no avail.

no matter what i do, the build links against the 'native' 
/usr/lib/libxml* ... successful w/ no error, just the 'wrong' lib.
Neither Python itself, nor any extension in the standard library, links 
to libxml.  What the heck are you talking about?

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] MacEnthon 0.0 testing release

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 21:03, Robert Kern wrote:
I am pleased to announce the availability of MacEnthon 0.0!
MacEnthon is the OS X counterpart to the popular "Enthought Edition" 
of Python: a convenient bundling of a number of packages geared for 
the scientific community. Right now, it targets the Apple-installed 
Python 2.3.0. Once I am satisfied with this release, I will consider 
cutting a release for Python 2.4.1. This is currently just a test 
release. Please do not tell newbies to go install it, yet.
Excellent.  You should probably be using PyProtocols CVS.  Which 
revision of PyObjC is in there?  I made some commits today...  
Hopefully you didn't pick something up while I was in the midst of 
working on the new Xcode templates...

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] MacEnthon 0.0 testing release

2005-04-03 Thread Robert Kern
Bob Ippolito wrote:
On Apr 3, 2005, at 21:03, Robert Kern wrote:
I am pleased to announce the availability of MacEnthon 0.0!
MacEnthon is the OS X counterpart to the popular "Enthought Edition" 
of Python: a convenient bundling of a number of packages geared for 
the scientific community. Right now, it targets the Apple-installed 
Python 2.3.0. Once I am satisfied with this release, I will consider 
cutting a release for Python 2.4.1. This is currently just a test 
release. Please do not tell newbies to go install it, yet.

Excellent.  You should probably be using PyProtocols CVS. 
Works for me.
Which 
revision of PyObjC is in there?  I made some commits today...  Hopefully 
you didn't pick something up while I was in the midst of working on the 
new Xcode templates...
Apparently I did. I touched a 00README.txt to get it to build. I'll 
rebuild tomorrow or whenever you guys think it's wise. I've been 
following the PyObjC list and the str-unicode issues.

--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


[Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread OpenMacNews
hi all,
i've originally posted this on python-list -- but I have a suspicion my 
questions may have to do with Mac-specific issues, so I'll try here as well ...

i've successfully built Python-2.4.1 from src on OSX 10.3.8 as a framework 
install with, simply:

   ./configure \
   --enable-framework \
   --with-threads \
   --with-cxx=g++ \
   --enable-ipv6 \
   --enable-toolbox-glue
   make frameworkinstall
i'm next attempting to build same but linking against an external instance of 
libxml2 (v2.6.18) installed in /usr/local ...

i've tried the ususal combinations of setting LDFLAGS and/or assigning 
--with-libs (="/usr/local/lib/libxml2.2.6.18.dylib"), to no avail.

no matter what i do, the build links against the 'native' /usr/lib/libxml* ... 
successful w/ no error, just the 'wrong' lib.

wondering whether i had unusual path probs, i also tried mv'ing the native libs 
out of the way, so that the only instance of libxml* is found in 
/usr/local/lib, but then the make fails, complaining that /usr/lib/libxml* is 
not found. sigh.

i'm fairly sure i'm missing something trivial here ...
any suggestions/pointers as to how to link *my* libxml into the framework build?
thanks!
richard
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] MacEnthon 0.0 testing release

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 21:48, Robert Kern wrote:
Bob Ippolito wrote:
On Apr 3, 2005, at 21:03, Robert Kern wrote:
I am pleased to announce the availability of MacEnthon 0.0!
MacEnthon is the OS X counterpart to the popular "Enthought Edition" 
of Python: a convenient bundling of a number of packages geared for 
the scientific community. Right now, it targets the Apple-installed 
Python 2.3.0. Once I am satisfied with this release, I will consider 
cutting a release for Python 2.4.1. This is currently just a test 
release. Please do not tell newbies to go install it, yet.
Excellent.  You should probably be using PyProtocols CVS.
Works for me.
Which revision of PyObjC is in there?  I made some commits today...  
Hopefully you didn't pick something up while I was in the midst of 
working on the new Xcode templates...
Apparently I did. I touched a 00README.txt to get it to build. I'll 
rebuild tomorrow or whenever you guys think it's wise. I've been 
following the PyObjC list and the str-unicode issues.
I trashed that 00README because it's no longer relevant to anything 
else in the repository.  The new docs aren't written yet.

It's fine to rebuild tomorrow, but I think we might make another 
relatively major change in the next week, aside from updated docs.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread OpenMacNews
hi bob,
no matter what i do, the build links against the 'native'
/usr/lib/libxml* ... successful w/ no error, just the 'wrong' lib.

Neither Python itself, nor any extension in the standard library, links to 
libxml.
well, that's good -- & at least consistent with why there's no significant 
reference to libxml in the src ...

if that's the case, then it seems even more odd to me that the python build is 
sensitive to its presence & location ... as,

What the heck are you talking about?
simply the output of my python build's 'make' (well, 'make frameworkinstall', 
anyway ... ):

but then the make fails, complaining that /usr/lib/libxml* is not found
with 'native' libxml* mv'd from /usr/lib,
% ls -al *xml*
 su: /usr/local/bin/ls: No match.
and libxml2-2.6.18 installed in /usr/local/lib,
% ls -al /usr/local/lib/*xml*
 -rwxr-xr-x  1 root staff 3038292 Apr  3 19:18 libxml2.2.6.18.dylib
 lrwxr-xr-x  1 root staff  20 Apr  3 19:18 libxml2.2.dylib -> 
libxml2.2.6.18.dylib
 -rw-r--r--  1 root staff 3651384 Apr  3 19:18 libxml2.a
 lrwxr-xr-x  1 root staff  20 Apr  3 19:18 libxml2.dylib -> 
libxml2.2.6.18.dylib
 -rwxr-xr-x  1 root staff 848 Apr  3 19:18 libxml2.la
 -rw-r--r--  1 root staff 228 Apr  3 19:18 xml2Conf.sh

python 'make' dies with ...
   ...
   Mkdir ///Applications/MacPython-2.4
   /bin/mkdir  -p ///Applications/MacPython-2.4
   StandaloneExecutable
   ///Applications/MacPython-2.4/PythonLauncher.app/Contents/MacOS/PythonLaunc
   her
   StandaloneExecutable.LinkUsingFileList
   ///Applications/MacPython-2.4/PythonLauncher.app/Contents/MacOS/PythonLaunc
   her
   gcc  -o
   ///Applications/MacPython-2.4/PythonLauncher.app/Contents/MacOS/PythonL
   auncher
   "-L/Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build"
   "-L/Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build"
   "-F/Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build"
   "-F/Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build"
   -filelist
   /Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build/Pytho
   nLauncher.build/PythonLauncher.build/Objects-normal/LinkFileList
   "-arch" "ppc" "-s" "-prebind" "-Wl,-no_arch_warnings"   "-framework"
   "Cocoa" "-framework" "Carbon"
   ld: warning prebinding disabled because dependent library:
   /usr/lib/libz.1.dylib is not prebound
   ld: warning can't open dynamic library: /usr/lib/libxml2.2.dylib (checking
   for undefined symbols may be affected) (No such file or directory, errno =
   2)
   ld: Undefined symbols:
   _xmlSAXUserParseMemory referenced from Foundation expected to be defined in
   /usr/lib/libxml2.2.dylib
   ...failed StandaloneExecutable.LinkUsingFileList
   ///Applications/MacPython-2.4/PythonLauncher.app/Contents/MacOS/PythonLaunc
   her ...
   ** BUILD FAILED **
   make[1]: *** [install_PythonLauncher] Error 1
   make: *** [frameworkinstallapps] Error 2
*something's* expecting libxml2 to be there ...
richard
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Robert Kern
OpenMacNews wrote:
/Volumes/Projects/ports/Python-2.4.1/Mac/OSX/PythonLauncher/build/Pytho
   nLauncher.build/PythonLauncher.build/Objects-normal/LinkFileList
   "-arch" "ppc" "-s" "-prebind" "-Wl,-no_arch_warnings"   "-framework"
   "Cocoa" "-framework" "Carbon"
   ld: warning prebinding disabled because dependent library:
   /usr/lib/libz.1.dylib is not prebound
   ld: warning can't open dynamic library: /usr/lib/libxml2.2.dylib 
(checking
   for undefined symbols may be affected) (No such file or directory, 
errno =
   2)
   ld: Undefined symbols:
   _xmlSAXUserParseMemory referenced from Foundation expected to be 
defined in
   /usr/lib/libxml2.2.dylib
   ...failed StandaloneExecutable.LinkUsingFileList
   
///Applications/MacPython-2.4/PythonLauncher.app/Contents/MacOS/PythonLaunc
   her ...
   ** BUILD FAILED **
   make[1]: *** [install_PythonLauncher] Error 1
   make: *** [frameworkinstallapps] Error 2

*something's* expecting libxml2 to be there ...
I'll bet that it's either Cocoa or Carbon. In that case, you definitely 
*don't* want it to use your own libxml2. Leave it be.

--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread OpenMacNews
hi robert,
*something's* expecting libxml2 to be there ...
I'll bet that it's either Cocoa or Carbon. In that case, you definitely
*don't* want it to use your own libxml2.
makes possible sense in that there's a reference to 'Foundation', which given 
your suspicion, refers to the OSX FoundationClass(es)? I.e., Cocoa/Carbon?

   >>ld: Undefined symbols:
   >>_xmlSAXUserParseMemory referenced from Foundation expected to be
   >> defined in
   >>/usr/lib/libxml2.2.dylib
thought i'd be very hard pressed to prove or disprove ...
Leave it be.
Which is certainly good advice if that IS the case ... yet I'm still a little 
foggy on the whole matter given Bob's earlier comment:

either Python itself, nor any extension in the standard library, links to 
libxml.  What the heck are you talking about?
which, iiuc, would suggest no dependence whatsoever on libxml -- either direct 
or indirect via Cocoa/Carbon.

so, again,
Leave it be.
seems to be good advice.
what concerns me a bit is that 'other' apps i'm building depend on my 
*external* libxml, and will -- eventually -- 'touch' some Python, which will 
depend 'still' on the native (cocoa/carbon related) libxml ...

Will this 'version incompatibility' come back to bite me in the ass?  i simply 
dunno.

short of understanding/resolving the libxml dependence i *am* seeing, I guess 
I'll just have to wait and see when i get there =)

thx,
richard
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] ANN: MacPython 2.4.1 installer

2005-04-03 Thread Lee Cullens
Well Bob - I decided to install your 2.4.1 before I get to a point 
where I could screw up something important :~)  In an initial pass 
through my learning project, all worked well so far.   The only thing I 
had to do was copy my localized package .pth file to a new folder  
~/Library/Python/2.4/site-packages.

I also installed the new py2app package but have not progressed to the 
point of using it yet.

Mainly what I am waiting on now is Kevin to announce that he has 
checked out SPE with wxPy 2.5.4.1, then I'll see if I need to 
update/move/change a path/whatever my previously downloaded wxPython.

Thanks for the effort Bob,
Lee C
On Mar 31, 2005, at 10:12 AM, Bob Ippolito wrote:
I've put together an "official unofficial" framework build 
distribution of Python 2.4.1 for Mac OS X 10.3 (and later, but that is 
not tested yet). It is built using the same tools that Jack builds the 
official MacPython distribution with.


-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Robert Kern
OpenMacNews wrote:
hi robert,
*something's* expecting libxml2 to be there ...

I'll bet that it's either Cocoa or Carbon. In that case, you definitely
*don't* want it to use your own libxml2.

makes possible sense in that there's a reference to 'Foundation', which 
given your suspicion, refers to the OSX FoundationClass(es)? I.e., 
Cocoa/Carbon?
Foundation is its own framework (see /System/Library/Frameworks) which 
is implicitly linked in by Cocoa and Carbon.

   >>ld: Undefined symbols:
   >>_xmlSAXUserParseMemory referenced from Foundation expected to be
   >> defined in
   >>/usr/lib/libxml2.2.dylib
thought i'd be very hard pressed to prove or disprove ...
Leave it be.

Which is certainly good advice if that IS the case ... yet I'm still a 
little foggy on the whole matter given Bob's earlier comment:

either Python itself, nor any extension in the standard library, links to 
libxml.  What the heck are you talking about?
which, iiuc, would suggest no dependence whatsoever on libxml -- either 
direct or indirect via Cocoa/Carbon.
No, he only meant directly, I'm sure.
so, again,
Leave it be.

seems to be good advice.
what concerns me a bit is that 'other' apps i'm building depend on my 
*external* libxml, and will -- eventually -- 'touch' some Python, which 
will depend 'still' on the native (cocoa/carbon related) libxml ...

Will this 'version incompatibility' come back to bite me in the ass?  i 
simply dunno.

short of understanding/resolving the libxml dependence i *am* seeing, I 
guess I'll just have to wait and see when i get there =)
Always a good idea. Don't fix it until it breaks. And it probably won't.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread OpenMacNews
robert,
Foundation is its own framework (see /System/Library/Frameworks)
yup.
which is implicitly linked in by Cocoa and Carbon.
sigh. more to learn.  =-)
clearly time to unpack & actually read my new copy of Hillegass' book ...
which, iiuc, would suggest no dependence whatsoever on libxml -- either
direct or indirect via Cocoa/Carbon.
No, he only meant directly, I'm sure.
hmmm. ok.
Always a good idea. Don't fix it until it breaks. And it probably won't.
well, rats! so much for the 'pleasant aesthetics' of version consistency ;-)
thx & cheers,
richard
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 23:23, OpenMacNews wrote:
*something's* expecting libxml2 to be there ...
I'll bet that it's either Cocoa or Carbon. In that case, you 
definitely
*don't* want it to use your own libxml2.
makes possible sense in that there's a reference to 'Foundation', 
which given your suspicion, refers to the OSX FoundationClass(es)? 
I.e., Cocoa/Carbon?

   >>ld: Undefined symbols:
   >>_xmlSAXUserParseMemory referenced from Foundation expected to 
be
   >> defined in
   >>/usr/lib/libxml2.2.dylib

thought i'd be very hard pressed to prove or disprove ...
Foundation is part of Cocoa, yes.
Leave it be.
Which is certainly good advice if that IS the case ... yet I'm still a 
little foggy on the whole matter given Bob's earlier comment:

either Python itself, nor any extension in the standard library, 
links to
libxml.  What the heck are you talking about?
which, iiuc, would suggest no dependence whatsoever on libxml -- 
either direct or indirect via Cocoa/Carbon.
No, you don't understand correctly.  That's not what I meant.
so, again,
Leave it be.
seems to be good advice.
what concerns me a bit is that 'other' apps i'm building depend on my 
*external* libxml, and will -- eventually -- 'touch' some Python, 
which will depend 'still' on the native (cocoa/carbon related) libxml 
...

Will this 'version incompatibility' come back to bite me in the ass?  
i simply dunno.

short of understanding/resolving the libxml dependence i *am* seeing, 
I guess I'll just have to wait and see when i get there =)
You are crazy!  Messing with /usr/lib or /System is just *BEGGING* to 
break your OS.  If you reboot with that libxml moved, your system might 
not even come up!

DO NOT DO THAT. EVER.
The fact that Foundation internally uses libxml is none of your 
business.

Mac OS X uses a 2 level symbol namespace, and will not have a problem 
with this, unless you use stupid linker flags like -flat_namespace.  
Python, since 2.3 (possibly in some 2.2 version as well, but I don't 
care), will not use -flat_namespace.  If you statically link to your 
external libxml, then it's impossible to have a problem, because the 
symbols aren't looked up at runtime and aren't exported to other 
modules.

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Bob Ippolito
On Apr 3, 2005, at 23:52, OpenMacNews wrote:
Foundation is its own framework (see /System/Library/Frameworks)
yup.
which is implicitly linked in by Cocoa and Carbon.
Actually no, Carbon doesn't link to Foundation.  Everything written in 
Objective-C does, though.  You're probably thinking of CoreFoundation.

sigh. more to learn.  =-)
clearly time to unpack & actually read my new copy of Hillegass' book 
...
That book isn't going to talk about mundane details about how Mac OS 
X's internal frameworks are linked together (which changes every 
release, and is really none of your business).  Though the book will 
probably be enlightening, it's not in any way relevant to this.

Why are you building your own framework anyway?  The one I built 
 is perfectly good, and I actually 
know what I'm doing ;)

-bob
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig


Re: [Pythonmac-SIG] can't link Python 2.4.1 against external libxml2 ...

2005-04-03 Thread Robert Kern
Bob Ippolito wrote:
On Apr 3, 2005, at 23:52, OpenMacNews wrote:
Foundation is its own framework (see /System/Library/Frameworks)

yup.
which is implicitly linked in by Cocoa and Carbon.

Actually no, Carbon doesn't link to Foundation.  Everything written in 
Objective-C does, though.  You're probably thinking of CoreFoundation.
Ah, yes, you're right. Thank you.
--
Robert Kern
[EMAIL PROTECTED]
"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter
___
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig