Skip to content

Commit 05ceafc

Browse files
committed
add README
1 parent 05f6bb9 commit 05ceafc

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# ocaml-python: Using Python scripts from OCaml
2+
3+
This is a minimal skeleton demonstrating how to invoke Python scripts from OCaml.
4+
5+
## Build & Run
6+
Simply execute `make test` to build, install, and run. Or, if you prefer to do things step by step:
7+
1. `make build` to build the package
8+
2. `make install` to install the package using `opam`, OCaml's package manager
9+
3. `ocaml-python` to execute the OCaml binary
10+
To uninstall, execute `make uninstall`.
11+
12+
## Dependencies
13+
At a minimum, the package requires:
14+
* **OCaml**, version 4.05.0 or newer
15+
* **Python 3**, to run the Python script
16+
* **opam**, OCaml's package manager
17+
* **jbuilder**, an OCaml build tool
18+
19+
Additionally, the following OCaml packages must be installed through `opam`:
20+
* **ocamlfind**, to locate the Python script at runtime
21+
* **core**, Jane Street's de facto standard library for OCaml
22+
With `opam` installed, acquiring these packages is as easy as excecuting `opam install ocamlfind core`
23+
24+
### OS
25+
The package has been tested with Ubuntu and MacOS and should work on all Unix systems.

ocaml-python.opam

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build-test: ["jbuilder" "runtest" "-p" name "-j" jobs]
1111
install: ["jbuilder" "install" "-p" name "-j" jobs]
1212

1313
depends: [
14-
"jbuilder" {>="1.0+beta13"}
14+
"jbuilder" {>="1.0+beta13" & build}
1515
"core" {>= "0.9.0"}
1616
"findlib"
1717
]

0 commit comments

Comments
 (0)