On Thu, May 04, 2000 at 09:46:22PM -0400, Greg Ward wrote:
On 27 April 2000, Harry Henry Gebel said:
One important consideration for --arch : Unless ./setup.py can be made to recognize the rpm's CFLAGS it will generate the same object code no matter what architecture you specify. That's a feature. No way do I plan to support cross-compiling in the Distutils. Quick, when was the last time anybody cared about cross-compiling? ;-)
However, I may have been wrong -- ie. it looks as though RPM is smart enough to put in the "right" build arch string itself. The only thing Distutils would have to do, then, is set it to "noarch" if there are no extensions -- ie. if this is a pure Python module distribution.
I wasn't looking at --arch and CFLAGS to support cross-compiling, rather it is to support different versions of the same processor family. If I compile 'module-1.0-1.src.rpm' on an i386 or with '--target=i386' it will generate 'module-1.0-1.i386.rpm' but if I compile the same source RPM on a Pentium II or with '--target=i686' it will generate 'module-1.0-1.i686.rpm' even though it is really an i386 binary because ./setup.py does not pass any '--mcpu' or '--march' options to gcc. RPM sets a variable containing the appropriate '--mcpu' and '--march' (and other) options, but in does not appear that there is any way to use this variable in ./setup.py at this time. -- Harry Henry Gebel, Senior Developer, Landon House SBS West Dover Hundred, Delaware PyNcurses ncurses binding for Python: http://pyncurses.sourceforge.ne