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.

Author djmdjm
Recipients djmdjm
Date 2008-12-15.11:49:50
SpamBayes Score 1.06899e-06
Marked as misclassified No
Message-id <1229341792.75.0.0111494669008.issue4670@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2008-12-15 11:49:52djmdjmsetrecipients: + djmdjm
2008-12-15 11:49:52djmdjmsetmessageid: <1229341792.75.0.0111494669008.issue4670@psf.upfronthosting.co.za>
2008-12-15 11:49:51djmdjmlinkissue4670 messages
2008-12-15 11:49:50djmdjmcreate