In the past I've used this command:
opam reinstall --yes --switch ocaml-variants.4.07.1+flambda_coq-serapi.8.11.0+0.11.1 --keep-build-dir lf
I think this command only worked because I also pinned the pkg e.g. (ran it from within python from unimportant reasons):
command = (['opam', 'pin', '-y']
+ root_option()
+ ['--switch', switch]
+ [coq_package, coq_package_pin])
How do I reinstall it using the path to the proj instead i.e. using coq_package_pin
?
I think something like this should work:
command: list = ['opam'] + ['reinstall'] + root_option() + ['--yes'] + ['--switch', switch] + \
['--keep-build-dir', coq_project_path] + \
[coq_project_path]
Note pining the package is giving me issues so I'd like to avoid it if possible.
related:
- Is an opam pin project needed when one wants to install an opam project with opam reinstall or 'make'?
- https://discuss.ocaml.org/t/how-does-one-reinstall-an-opam-package-proj-using-the-absolute-path-to-the-project-without-relying-on-opam-pin/10944
- https://discuss.ocaml.org/t/what-is-the-difference-between-opam-pin-and-opam-install-when-to-use-one-vs-the-other/10942/5