release22-maint branch broken
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
Tim Rice wrote:
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
The revised version of sysconfig.py figures out if it's in the build directory by looking for a landmark file; the landmark is Modules/Setup. Does that file exist? --amk
On Fri, 22 Nov 2002, A.M. Kuchling wrote:
Tim Rice wrote:
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
The revised version of sysconfig.py figures out if it's in the build directory by looking for a landmark file; the landmark is Modules/Setup. Does that file exist?
Yes it does. I put some prints in ... argv0_path = os.path.dirname(os.path.abspath(sys.executable)) print argv0_path landmark = os.path.join(argv0_path, "Modules", "Setup") print landmark if not os.path.isfile(landmark): python_build = 0 print "python_build = 0" elif os.path.isfile(os.path.join(argv0_path, "Lib", "os.py")): python_build = 1 print "python_build = 1" else: python_build = os.path.isfile(os.path.join(os.path.dirname(argv0_path), "Lib", "os.py")) print "else" print python_build del argv0_path, landmark ... And get ... /usr/local/src/utils/Python-2 /usr/local/src/utils/Python-2/Modules/Setup else 0 running build ... Could this breaking because I build outside of the source tree?
--amk
-- Tim Rice Multitalents (707) 887-1469 tim@multitalents.net
participants (2)
-
A.M. Kuchling
-
Tim Rice