Updated README to reflect the little bit of extra work needed for usage. (#7)
Updated README to reflect the little bit of extra work needed for usage.
diff --git a/README.md b/README.md
index 2949919..8ef2eb3 100644
--- a/README.md
+++ b/README.md
@@ -1,11 +1,5 @@
# Bazel extensions for pybind11
-In your build file:
-
-```
-load("//third_party/pybind11_bazel:build_defs.bzl", "pybind_extension")
-```
-
Provided rules:
- `pybind_extension`: Builds a python extension, automatically adding the
@@ -19,3 +13,30 @@
To test a `pybind_extension`, the most common approach is to write the test in
python and use the standard `py_test` build rule.
+
+## Installation
+
+In your `WORKSPACE` file:
+
+```starlark
+http_archive(
+ name = "pybind11_bazel",
+ strip_prefix = "pybind11_bazel-<stable-commit>",
+ urls = ["https://github.com/pybind/pybind11_bazel/archive/<stable-commit>.zip"],
+)
+# We still require the pybind library.
+http_archive(
+ name = "pybind11",
+ build_file = "@pybind11_bazel//:pybind11.BUILD",
+ strip_prefix = "pybind11-<stable-version>",
+ urls = ["https://github.com/pybind/pybind11/archive/v<stable-version>.tar.gz"],
+)
+load("@pybind11_bazel//:python_configure.bzl", "python_configure")
+python_configure(name = "local_config_python")
+```
+
+Then, in your `BUILD` file:
+
+```starlark
+load("@pybind11_bazel//:build_defs.bzl", "pybind_extension")
+```