Skip to content

Commit d8435e4

Browse files
author
Jean Jordaan
committed
Don't fail for 'python setup.py build'.
1 parent 1d31cb1 commit d8435e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
19-
# $Id: setup.py,v 1.53 2003-06-09 23:17:20 richard Exp $
19+
# $Id: setup.py,v 1.54 2003-06-17 11:03:27 neaj Exp $
2020

2121
from distutils.core import setup, Extension
2222
from distutils.util import get_platform
@@ -78,7 +78,8 @@ def copy_scripts(self):
7878
module = os.path.splitext(os.path.basename(script))[0]
7979
module = string.translate(module, to_module)
8080
cmdopt=self.distribution.command_options
81-
if cmdopt['install'].has_key('prefix'):
81+
if (cmdopt.has_key('install') and
82+
cmdopt['install'].has_key('prefix')):
8283
prefix = cmdopt['install']['prefix'][1]
8384
version = '%d.%d'%sys.version_info[:2]
8485
prefix = '''

0 commit comments

Comments
 (0)