I try to make my project stand-alone, with all the main dependencies of third-party libraries created and mentioned in the project repository. The main ocaml parts of my project are based on ocamlbuild.
But for complex packages like Batteries Included, there seems to be a strong expectation that they will be connected to the project through ocamlfind. Ocamlfind is supposed to assume that packages will be installed globally. (I understand that it allows environment variables and its conf to point to alternative locations, but it still seems to be built around the assumption that packages are configured globally - it does not have the equivalent of -I or -L flags for dynamic expansion, for example , the search path for packages Itβs possible to set environment variables to dynamically override ocamlfind configuration to search for the local project tree, but this is much more inconvenient than just arguments, and it also seems to be difficult to do without one temporarily removing the detection capabilities of the main system packages, mainly site-lib , which may also be needed.)
What is a reasonable strategy for creating and creating against non-trivial third-party packages in a local project for a project using ocamlbuild?
source share