2.2 install fails with "SyntaxError: invalid token" compiling many library files

george young gry at ll.mit.edu
Mon Mar 11 13:56:20 EST 2002


Python 2.2, SuSE Linux 7.3 [2.4.10]
When running(as root) make install of Python 2.2, I get many (550 !) errors like:

  File "/usr/local/lib/python2.2/Bastion.py", line 1
    "
    ^
  SyntaxError: invalid token

in compile_all.py.  In fact a manual:
  ./python
  Python 2.2 (#5, Mar 11 2002, 13:03:58) 
  [GCC 3.0.4] on linux2
  >>> import py_compile
  >>> py_compile.compile('/usr/local/lib/python2.2/Bastion.py')
gets the same error.

If I edit the Bastion.py file and put a blank line at the front, it compiles fine.
What gives?
.................................................
Also at the end of the install, it crashes with:
running build
running build_ext
skipping 'regex' extension (up-to-date)
skipping 'pcre' extension (up-to-date)
skipping '_hotshot' extension (up-to-date)
skipping 'strop' extension (up-to-date)
WARNING: removing "strop" since importing it failed
Traceback (most recent call last):
  File "./setup.py", line 793, in ?
    main()
  File "./setup.py", line 787, in main
    scripts = ['Tools/scripts/pydoc']
  File "/home/geoyou/Python-2.2/Lib/distutils/core.py", line 138, in setup
    dist.run_commands()
  File "/home/geoyou/Python-2.2/Lib/distutils/dist.py", line 893, in run_commands
    self.run_command(cmd)
  File "/home/geoyou/Python-2.2/Lib/distutils/dist.py", line 913, in run_command
    cmd_obj.run()
  File "/home/geoyou/Python-2.2/Lib/distutils/command/build.py", line 107, in run
    self.run_command(cmd_name)
  File "/home/geoyou/Python-2.2/Lib/distutils/cmd.py", line 330, in run_command
    self.distribution.run_command(command)
  File "/home/geoyou/Python-2.2/Lib/distutils/dist.py", line 913, in run_command
    cmd_obj.run()
  File "/home/geoyou/Python-2.2/Lib/distutils/command/build_ext.py", line 256, in run
    self.build_extensions()
  File "./setup.py", line 147, in build_extensions
    build_ext.build_extensions(self)
  File "/home/geoyou/Python-2.2/Lib/distutils/command/build_ext.py", line 383, in build_extensions
    self.build_extension(ext)
  File "./setup.py", line 179, in build_extension
    for filename in self._built_objects:
  File "/home/geoyou/Python-2.2/Lib/distutils/cmd.py", line 107, in __getattr__
    raise AttributeError, attr
AttributeError: _built_objects
make: *** [sharedmods] Error 1

What gives?

-- George
-- 
 I cannot think why the whole bed of the ocean is
 not one solid mass of oysters, so prolific they seem. Ah,
 I am wandering! Strange how the brain controls the brain!
	-- Sherlock Holmes in "The Dying Detective"



More information about the Python-list mailing list