This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: setup.py exception when db_setup_debug = True
Type: compile error Stage:
Components: Build Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, djmdjm
Priority: normal Keywords:

Created on 2008-12-15 11:49 by djmdjm, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg77860 - (view) Author: Damien Miller (djmdjm) Date: 2008-12-15 11:49
Hi,

I receive the following exception when trying to build with
db_setup_debug = True in setup.py. db_ver is not initialised in this
path, except by accident so I think the obvious solution of 

-    if db_setup_debug: print "db.h: unsupported version", db
_ver, "in", d
+    if db_setup_debug: print "db.h: no version in", d

Is the correct fix.

running build
running build_ext
db: looking for db.h in ./db.h
db: looking for db.h in Include/db.h
db: looking for db.h in ./Include/db.h
db: looking for db.h in /usr/local/include/db.h
db: looking for db.h in
/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Include/db.h
db: looking for db.h in
/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/db.h
db: looking for db.h in /usr/include/db.h
db.h: unsupported version
Traceback (most recent call last):
  File "./setup.py", line 1543, in <module>
    main()
  File "./setup.py", line 1538, in main
    scripts = []
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/core.py",
line 151, in setup
    dist.run_commands()
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/dist.py",
line 974, in run_commands
    self.run_command(cmd)
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/dist.py",
line 994, in run_command
    cmd_obj.run()
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/command/build.py",
line 112, in run
    self.run_command(cmd_name)
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/cmd.py",
line 333, in run_command
    self.distribution.run_command(command)
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/dist.py",
line 994, in run_command
    cmd_obj.run()
  File
"/usr/ports/lang/python/2.5/w-Python-2.5.3c1/Python-2.5.3c1/Lib/distutils/command/build_ext.py",
line 290, in run
    self.build_extensions()
  File "./setup.py", line 97, in build_extensions
    self.detect_modules()
  File "./setup.py", line 700, in detect_modules
    if db_setup_debug: print "db.h: unsupported version", db_ver, "in", d
UnboundLocalError: local variable 'db_ver' referenced before assignment
msg78631 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-12-31 16:44
Closing as "out of date": 2.6.0 already has the fix (since r54124), and
2.5 is now in security-fixes-only mode.
History
Date User Action Args
2022-04-11 14:56:42adminsetgithub: 48920
2008-12-31 16:44:20amaury.forgeotdarcsetstatus: open -> closed
resolution: out of date
messages: + msg78631
nosy: + amaury.forgeotdarc
2008-12-20 14:30:28loewissetversions: + Python 2.6, - Python 2.5.3
2008-12-15 11:49:52djmdjmcreate