Commit b2ea0ed4 authored by Michael Droettboom's avatar Michael Droettboom Committed by GitHub

Merge pull request #127 from mdboom/use-results-of-install

Install to a directory, and use that, instead of just the build/lib...
parents 56ef3a09 30e82a2d
......@@ -18,6 +18,7 @@ source:
- patches/pass-along-errors-from-init.patch
- patches/use-dummy-threading.patch
- patches/use-local-blas-lapack.patch
- patches/fix-install-with-skip-build.patch
build:
cflags: -include math.h -I../../config
......
diff --git a/numpy/distutils/command/install_clib.py b/numpy/distutils/command/install_clib.py
index 662aa00bd..6f51e22ca 100644
--- a/numpy/distutils/command/install_clib.py
+++ b/numpy/distutils/command/install_clib.py
@@ -20,6 +20,9 @@ class install_clib(Command):
def run (self):
build_clib_cmd = get_cmd("build_clib")
build_dir = build_clib_cmd.build_clib
+ if build_dir is None:
+ build_clib_cmd.finalize_options()
+ build_dir = build_clib_cmd.build_clib
# We need the compiler to get the library name -> filename association
if not build_clib_cmd.compiler:
......@@ -135,17 +135,17 @@ def compile(path, srcpath, pkg, args):
def package_files(buildpath, srcpath, pkg, args):
if (buildpath / '.pacakaged').is_file():
if (buildpath / '.packaged').is_file():
return
name = pkg['package']['name']
libdir = get_libdir(srcpath, args)
install_prefix = (srcpath / 'install').resolve()
subprocess.run([
'python',
Path(os.environ['EMSCRIPTEN']) / 'tools' / 'file_packager.py',
name + '.data',
'--preload',
'{}@/lib/python3.6/site-packages'.format(libdir),
'{}@/'.format(install_prefix),
'--js-output={}'.format(name + '.js'),
'--export-name=pyodide',
'--exclude', '*.wasm.pre',
......
......@@ -186,12 +186,23 @@ def clean_out_native_artifacts():
path.unlink()
def install_for_distribution():
subprocess.check_call(
[Path(args.host) / 'bin' / 'python3',
'setup.py',
'install',
'--skip-build',
'--prefix=install',
'--old-and-unmanageable'])
def build_wrap(args):
build_log_path = Path('build.log')
if not build_log_path.is_file():
capture_compile(args)
clean_out_native_artifacts()
replay_compile(args)
install_for_distribution()
def parse_args():
......
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