Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build MEX files as part of installation #44

Closed
truemerrill opened this issue Dec 7, 2017 · 1 comment
Closed

Build MEX files as part of installation #44

truemerrill opened this issue Dec 7, 2017 · 1 comment

Comments

@truemerrill
Copy link

In other languages specific package managers (Python's pip and distutils system) it is possible to directly build extensions to the language as part of the package installation process. Octave has a package system that allows a similar functionality.

To achieve something similar with mpm, we might intoduce one or more optional .m files which live at a special location relative to the package root. These files implement hooks that are run at the build, install, and uninstall steps. The package maintainer would write hooks and distribute them as part of the package. If a hook is not implemented, mpm would just skip that step.

For example, a build hook might consist of a few calls to mex ...

mex myFile.c -myFlags 

In the Octave system, it's possible to run a ./configure script at build time to resolve any system specific include paths and flags.

The hooks get copied over to a package-specific metadata directory by mpm. Then at uninstall time, mpm runs the copy of the uninstall hook cached in the metadata directory before wiping it clean.

@mobeets
Copy link
Owner

mobeets commented Jul 29, 2018

New commit 8dd9534

This checks for files install.m when running mpm install _, and uninstall.m when running mpm uninstall _. (Confirms with user before running, unless --force is set.)

@mobeets mobeets closed this as completed Jul 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants