Stanley A. Klein wrote:
> Robert Kern wrote:
> Stanley A. Klein wrote:
> 
>>> I tried to do something to fix the numpy distutils bdist_rpm.py (by
>>> trying to follow what was done in install.py) but it didn't work and I
>>> got an error message I didn't understand.
> 
>> I'd like to help, but if you don't copy the exact error message here, I
> can't.
> 
> OK, here is my revised numpy/distutils/commands/bdist_rpm.py (trying --
> obviously not well -- to follow what was done in
> numpy/distutils/commands/install.py:
> 
> import os
> import sys
> 
> if 'setuptools' in sys.modules:
>     import setuptools.command.bdist_rpm as old_bdist_rpm
>     class bdist_rpm(old_bdist_rpm):
>         pass
> 
> else:
>     from distutils.command.bdist_rpm import bdist_rpm as old_bdist_rpm

Note the difference between these two lines. You imported a module, not the
class inside it. Try this instead:

if 'setuptools' in sys.modules:
    from setuptools.command.bdist_rpm import bdist_rpm as old_bdist_rpm
else:
    from distutils.command.bdist_rpm import bdist_rpm as old_bdist_rpm

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to