Enable absolute imports, true division, & print()
These have no effect in Python 3.x, they are the default. Enabling them in Python 2.x, enabling them in Python 2.x allows single source compatiblity.
This commit is contained in:
parent
55280a73ee
commit
0f3cadcc3e
17 changed files with 43 additions and 7 deletions
|
|
@ -1,4 +1,7 @@
|
|||
# -*- python -*-
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import platform
|
||||
|
|
@ -43,9 +46,9 @@ env['prefix'] = os.path.abspath(env['prefix'])
|
|||
if 'DESTDIR' in env:
|
||||
env['DESTDIR'] = os.path.abspath(env['DESTDIR'])
|
||||
if rel_prefix:
|
||||
print >>sys.stderr, '--!!-- You used a relative prefix with a DESTDIR. This is probably not what you'
|
||||
print >>sys.stderr, '--!!-- you want; files will be installed in'
|
||||
print >>sys.stderr, '--!!-- %s' % (calcInstallPath('$prefix'),)
|
||||
print('--!!-- You used a relative prefix with a DESTDIR. This is probably not what you', file=sys.stderr)
|
||||
print('--!!-- you want; files will be installed in', file=sys.stderr)
|
||||
print('--!!-- %s' % (calcInstallPath('$prefix'),), file=sys.stderr)
|
||||
|
||||
|
||||
env['libpath'] = calcInstallPath('$prefix', 'lib')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue