[Python-Dev] release22-maint branch broken

Tim Rice tim@multitalents.net
Thu, 21 Nov 2002 14:25:26 -0800 (PST)


I pulled the release22-maint branch today and tried to build on UnixWare 7
It looks like changes to setup.py and Lib/distutils/sysconfig.py
broke the build. At least if there is no pre existing python installed.

Here is the CVS log.
...
Backport fdrake's
    revision 1.88 of setup.py
    revision 1.46 of Lib/distutils/sysconfig.py

When using a Python that has not been installed to build 3rd-party
modules, distutils does not understand that the build version of the
source tree is needed.

This patch fixes distutils.sysconfig to understand that the running
Python is part of the build tree and needs to use the appropriate
"shape" of the tree. This does not assume anything about the current
directory, so can be used to build 3rd-party modules using Python's
build tree as well.

This is useful since it allows us to use a non-installed debug-mode
Python with 3rd-party modules for testing. It as the side-effect that
set_python_build() is no longer needed (the hack which was added to
allow distutils to be used to build the "standard" extension modules).

This closes SF patch #547734.
...

Here are the errors I get
...
running build_ext
Traceback (most recent call last):
  File "/opt/src/utils/python/python-2.2.2/src/setup.py", line 795, in ?
    main()
  File "/opt/src/utils/python/python-2.2.2/src/setup.py", line 790, in main
    scripts = ['Tools/scripts/pydoc']
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/core.py", line 138, in setup
    dist.run_commands()
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/dist.py", line 902, in run_commands
    self.run_command(cmd)
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/dist.py", line 922, in run_command
    cmd_obj.run()
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/command/build.py", line 107, in run
    self.run_command(cmd_name)
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/cmd.py", line 330, in run_command
    self.distribution.run_command(command)
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/dist.py", line 922, in run_command
    cmd_obj.run()
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/command/build_ext.py", line 231, in run
    customize_compiler(self.compiler)
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/sysconfig.py", line 139, in customize_compiler
    (cc, opt, ccshared, ldshared, so_ext) = \
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/sysconfig.py", line 421, in get_config_vars
    func()
  File "/opt/src/utils/python/python-2.2.2/src/Lib/distutils/sysconfig.py", line 326, in _init_posix
    raise DistutilsPlatformError(my_msg)
distutils.errors.DistutilsPlatformError: invalid Python installation: unable to open /usr/local/lib/python2.2/config/Makefile (No such file or directory)
gmake: *** [sharedmods] Error 1
...

There is no /usr/local/lib/python2.2/config/Makefile because python
has not been built/installed on this machine yet.

-- 
Tim Rice				Multitalents	(707) 887-1469
tim@multitalents.net