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