[XML-SIG] broken install of PyXML-0.8.2 on darwin
Martina Oefelein
Martina@Oefelein.de
Thu, 6 Mar 2003 22:07:58 +0100
Hi Martin
> It's relatively unlikely that I implement that change. For every PyXML
> release for the last two years, somebody said that it won't work on
> Darwin, and proposed a change to make it work. I implemented that
> change, and then in the next release, somebody else said that the
> previous solution doesn't work, and proposed something else.
>
> So unless I get a specific patch with elaboration why a certain setup
> is the right thing, and an email address I can put into setup.py, I'm
> unwilling to make any changes I cannot test.
OK, so I'll elaborate:
When trying to run setup.py, you get this error:
[iBook:~/Desktop/PyXML-0.8.2] martina% python setup.py build
Traceback (most recent call last):
File "setup.py", line 58, in ?
if sys.platform[:6] == "darwin" and \
NameError: name 'distutils' is not defined
[iBook:~/Desktop/PyXML-0.8.2] martina%
The offending code is:
if sys.platform[:6] == "darwin" and \
distutils.sysconfig.get_config_var("LDSHARED").find("-flat_namespace")
== -1:
# Mac OS X
LDFLAGS.append('-flat_namespace')
This fails due to two trivial and obvious errors:
(a) there is no "import distutils", instead in line 11:
from distutils.sysconfig import get_config_vars
(b) the wrong function is imported (get_config_vars instead of
get_config_var).
The proposed patch fixes both (a) and (b). After this patch it builds,
albeit with a bunch of warnings (tested with the original Apple python
on MacOS X 10.2.4)
ciao
Martina