Allow bootstrap to be invoked via python2
This means that on most Linux distributions where python3 is the default, we can invoke `python2 script/bootstrap.py` and have it all work
This commit is contained in:
parent
d171cfe8d0
commit
3ee366257c
7 changed files with 14 additions and 13 deletions
3
tools/atom_source_root.js
Normal file
3
tools/atom_source_root.js
Normal file
|
@ -0,0 +1,3 @@
|
|||
var path = require('path')
|
||||
|
||||
console.log(path.resolve(path.dirname(__dirname)))
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
|
||||
"""Prints the absolute path of the root of atom-shell's source tree.
|
||||
"""
|
||||
|
||||
|
||||
print os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
|
1
tools/get-endianness.js
Normal file
1
tools/get-endianness.js
Normal file
|
@ -0,0 +1 @@
|
|||
console.log(require('os').endianness() === 'BE' ? 'big' : 'little')
|
|
@ -31,6 +31,11 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
python2=$(which python2)
|
||||
if [ ! -x "$python2" ] ; then
|
||||
python2=python
|
||||
fi
|
||||
|
||||
rewrite=`dirname $0`/rewrite_dirs.py
|
||||
package=${!#}
|
||||
|
||||
|
@ -46,4 +51,4 @@ set -e
|
|||
# pkg-config's |prefix| variable.
|
||||
prefix=`PKG_CONFIG_LIBDIR=$libdir pkg-config --variable=prefix "$package" | sed -e 's|/usr$||'`
|
||||
result=`PKG_CONFIG_LIBDIR=$libdir pkg-config "$@"`
|
||||
echo "$result"| $rewrite --sysroot "$root" --strip-prefix "$prefix"
|
||||
echo "$result"| $python2 $rewrite --sysroot "$root" --strip-prefix "$prefix"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue