[Python-bugs-list] [ python-Bugs-620364 ] core setup.py fails on Windows

noreply@sourceforge.net noreply@sourceforge.net
Tue, 08 Oct 2002 10:50:45 -0700


Bugs item #620364, was opened at 2002-10-08 13:50
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=620364&group_id=5470

Category: Build
Group: Python 2.2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: David Rushby (woodsplitter)
Assigned to: Nobody/Anonymous (nobody)
Summary: core setup.py fails on Windows

Initial Comment:
1. Extract Python-2.2.2b1.tgz into a directory
(E:\dev\python\src in this case).
2. Run 'python setup.py build' in the source root
directory.
3. Witness the bug (output shown at the bottom of this
message).

  The problem is that on line 81 of setup.py, the
srcdir is set to None rather than a meaningful
directory name
(distutils.sysconfig.get_config_vars('srcdir') returns
[None]).  The traceback below arises on line 84, when
None is passed as an argument to os.path.join.

  My operating system is Windows 2000, and I have MSVC
6 installed.  The compiler is configured properly; I've
built many other distutils-ified extensions without a
hitch.

  This bug arises regardless of whether the
Python-2.2.1 version of distutils or the Python-2.2.2b1
version of distutils is used (both versions are labeled
as distutils 1.0.3).  To generate the traceback shown
below, I used the official Windows binary distribution
of Python-2.2.1 (that is, the 'python' in 'python
setup.py build' referred to Python-2.2.1), but the
results are the same if I compile Python-2.2.2b1 by
other means and then attempt to use the resulting
executable to run its own distutils setup script.

----------------------------------------------------------
E:\dev\python\src\Python-2.2.2b1>python setup.py build
running build
running build_ext
Traceback (most recent call last):
  File "setup.py", line 792, in ?
    main()
  File "setup.py", line 787, in main
    scripts = ['Tools/scripts/pydoc']
  File "e:\dev\python\core\lib\distutils\core.py", line
138, in setup
    dist.run_commands()
  File "e:\dev\python\core\lib\distutils\dist.py", line
893, in run_commands
    self.run_command(cmd)
  File "e:\dev\python\core\lib\distutils\dist.py", line
913, in run_command
    cmd_obj.run()
  File
"e:\dev\python\core\lib\distutils\command\build.py",
line 107, in run
    self.run_command(cmd_name)
  File "e:\dev\python\core\lib\distutils\cmd.py", line
330, in run_command
    self.distribution.run_command(command)
  File "e:\dev\python\core\lib\distutils\dist.py", line
913, in run_command
    cmd_obj.run()
  File
"e:\dev\python\core\lib\distutils\command\build_ext.py",
line 256, in run

    self.build_extensions()
  File "setup.py", line 84, in build_extensions
    moddir = os.path.join(os.getcwd(), srcdir, 'Modules')
  File "E:\dev\python\core\Lib\ntpath.py", line 49, in join
    elif isabs(b):
  File "E:\dev\python\core\Lib\ntpath.py", line 35, in
isabs
    s = splitdrive(s)[1]
  File "E:\dev\python\core\Lib\ntpath.py", line 101, in
splitdrive
    if p[1:2] == ':':
TypeError: unsubscriptable object

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=620364&group_id=5470