Commit 0c6b653f authored by Roman Yurchak's avatar Roman Yurchak

Revert using ROOTDIR instead of TOOLSDIR

parent 8973c286
......@@ -122,7 +122,7 @@ def package_files(buildpath, srcpath, pkg, args):
install_prefix = (srcpath / 'install').resolve()
subprocess.run([
'python',
common.TOOLSDIR / 'file_packager.py',
common.ROOTDIR / 'file_packager.py',
name + '.data',
'--lz4',
'--preload',
......
from pathlib import Path
ROOTDIR = Path(__file__).parents[1].resolve()
TOOLSDIR = ROOTDIR / 'tools'
HOSTPYTHON = ROOTDIR / 'cpython' / 'build' / '3.7.0' / 'host'
TARGETPYTHON = ROOTDIR / 'cpython' / 'installs' / 'python-3.7.0'
ROOTDIR = Path(__file__).parents[1].resolve() / 'tools'
HOSTPYTHON = ROOTDIR / '..' / 'cpython' / 'build' / '3.7.0' / 'host'
TARGETPYTHON = ROOTDIR / '..' / 'cpython' / 'installs' / 'python-3.7.0'
DEFAULTCFLAGS = ''
DEFAULTLDFLAGS = ' '.join([
'-O3',
......
......@@ -39,7 +39,7 @@ import sys
from pyodide_build import common
TOOLSDIR = common.TOOLSDIR
ROOTDIR = common.ROOTDIR
symlinks = set(['cc', 'c++', 'ld', 'ar', 'gcc'])
......@@ -55,8 +55,8 @@ def collect_args(basename):
# native compiler
env = dict(os.environ)
path = env['PATH']
while str(TOOLSDIR) + ':' in path:
path = path.replace(str(TOOLSDIR) + ':', '')
while str(ROOTDIR) + ':' in path:
path = path.replace(str(ROOTDIR) + ':', '')
env['PATH'] = path
with open('build.log', 'a') as fd:
......@@ -76,7 +76,7 @@ def make_symlinks(env):
"""
exec_path = Path(__file__).resolve()
for symlink in symlinks:
symlink_path = TOOLSDIR / symlink
symlink_path = ROOTDIR / symlink
if not symlink_path.exists():
symlink_path.symlink_to(exec_path)
if symlink == 'c++':
......@@ -89,7 +89,7 @@ def make_symlinks(env):
def capture_compile(args):
env = dict(os.environ)
make_symlinks(env)
env['PATH'] = str(TOOLSDIR) + ':' + os.environ['PATH']
env['PATH'] = str(ROOTDIR) + ':' + os.environ['PATH']
result = subprocess.run(
[Path(args.host) / 'bin' / 'python3',
......
......@@ -3,8 +3,8 @@ import sys
from pyodide_build import __version__
if 'install' in sys.argv or 'bdist_wheel' in sys.argv:
print("Error: pyodode_build is currently for fully standalone, "
"and can only be installed in develop mode. Use:\n"
print("Error: pyodode_build is currently not fully standalone, "
"and can only be installed in development mode. Use:\n"
" pip install -e . \n"
"to install it.")
sys.exit(1)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment