Hej, Skapar man en fil (setup.py) enligt python distutils dokumentationen:
----------------- from distutils.core import setup, Extension module1 = Extension('demo', sources = ['demo.c']) setup (name = 'PackageName', version = '1.0', description = 'This is a demo package', ext_modules = [module1]) ----------------- utan att bry sig om att skapa filen 'demo.c' och kör sedan python setup.py build så får man ------------------- running build running build_ext building 'demo' extension error: file 'demo.c' does not exist ------------------- som förväntat. I alla fall får jag det på en woody installation och en sarge, där jag installerade från scratch. Men på en annan burk där jag körde en dist-upgrade från woody till sarge får jag istället: ------------------- running build running build_ext Traceback (most recent call last): File "setup.py", line 8, in ? ext_modules = [module1]) File "/usr/lib/python2.3/distutils/core.py", line 149, in setup dist.run_commands() File "/usr/lib/python2.3/distutils/dist.py", line 907, in run_commands self.run_command(cmd) File "/usr/lib/python2.3/distutils/dist.py", line 927, in run_command cmd_obj.run() File "/usr/lib/python2.3/distutils/command/build.py", line 107, in run self.run_command(cmd_name) File "/usr/lib/python2.3/distutils/cmd.py", line 333, in run_command self.distribution.run_command(command) File "/usr/lib/python2.3/distutils/dist.py", line 927, in run_command cmd_obj.run() File "/usr/lib/python2.3/distutils/command/build_ext.py", line 244, in run customize_compiler(self.compiler) File "/usr/lib/python2.3/distutils/sysconfig.py", line 163, in customize_compiler cpp = cc + " -E" # not always TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' ---------------- så på något sätt hittar inte Python konfigurationen för C kompilatorn. Både gcc-2.95 och gcc-3.3 är installerade. Finns det någon som känner till detta? /Michael --------------------------------------------------------------------------- Michael Olberg | e-mail: [EMAIL PROTECTED] Onsala Space Observatory | tel: +46-31-7725507 (work) +46-300-10778 (home) S-43992 Onsala, SWEDEN | fax: +46-31-7725590 -------------------- This quote left blank intentionally ------------------