Use Path.resolve() to get the absolute path of bin/pyodide

This commit is contained in:
Roman Yurchak 2018-09-24 21:44:08 +02:00
parent 22e99f12d1
commit 71e495e20a
1 changed files with 2 additions and 3 deletions

View File

@ -1,10 +1,9 @@
#!/bin/sh #!/bin/sh
set -x set -x
ls -l /bin/sh
# get the absolute path to the root directory # get the absolute path to the root directory
ROOTDIR="$(cd ${BASH_SOURCE%/*}/../; pwd)"; ROOTDIR=$(python -c 'import pathlib, sys; print(pathlib.Path(sys.argv[1]).resolve().parent)' \
"${BASH_SOURCE[0]}")
export PYTHONPATH="${PYTHONPATH}:${ROOTDIR}" export PYTHONPATH="${PYTHONPATH}:${ROOTDIR}"
python -m pyodide_build "$@" python -m pyodide_build "$@"