Skip to content

Commit ce20881

Browse files
committed
Tidy paths: strip build path
1 parent df82e40 commit ce20881

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎2.7.10/package-pythonhome.sh‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ mkdir -p $PACKAGEDIR
2929
for i in site.py os.py posixpath.py stat.py genericpath.py warnings.py linecache.py types.py UserDict.py _abcoll.py abc.py _weakrefset.py copy_reg.py traceback.py sysconfig.py re.py sre_compile.py sre_parse.py sre_constants.py _sysconfigdata.py encodings/__init__.py codecs.py encodings/aliases.py encodings/utf_8.py __future__.py ast.py copy.py weakref.py platform.py string.py io.py tempfile.py random.py hashlib.py struct.py dummy_thread.py collections.py keyword.py heapq.py argparse.py textwrap.py gettext.py locale.py functools.py importlib/__init__.py glob.py fnmatch.py pickle.py colorsys.py contextlib.py zipfile.py shutil.py json/__init__.py json/decoder.py json/scanner.py encodings/hex_codec.py json/encoder.py difflib.py inspect.py dis.py opcode.py tokenize.py token.py xml/__init__.py xml/etree/__init__.py xml/etree/ElementTree.py xml/etree/ElementPath.py encodings/zlib_codec.py tarfile.py urlparse.py StringIO.py encodings/latin_1.py \
3030
"$@"; do
3131
if [ $PREFIX/lib/python2.7/$i -nt $PREFIX/lib/python2.7/${i%.py}.pyo ]; then
32-
python -OO -m py_compile $PREFIX/lib/python2.7/$i
32+
(cd $PREFIX && python -OO -m py_compile lib/python2.7/$i)
3333
fi
3434
mkdir -p $PACKAGEDIR/lib/python2.7/$(dirname $i)
3535
cp -au $PREFIX/lib/python2.7/${i%.py}.pyo $PACKAGEDIR/lib/python2.7/${i%.py}.pyo
3636
done
3737

38-
$FILE_PACKAGER \
39-
$OUTDIR/pythonhome.data --js-output=$OUTDIR/pythonhome-data.js \
40-
--preload $PACKAGEDIR@/ \
41-
--use-preload-cache --no-heap-copy $LZ4
38+
PACKAGEDIR_FULLPATH=$(readlink -f $PACKAGEDIR)
39+
(
40+
cd $OUTDIR; # use relative path in xxx-data.js
41+
$FILE_PACKAGER \
42+
pythonhome.data --js-output=pythonhome-data.js \
43+
--preload $PACKAGEDIR_FULLPATH@/ \
44+
--use-preload-cache --no-heap-copy $LZ4
45+
)

0 commit comments

Comments
 (0)