瀏覽代碼

move the bazel work over, too

Getty Ritter 2 年之前
父節點
當前提交
30c7879a27
共有 3 個文件被更改,包括 31 次插入0 次删除
  1. 3 0
      .gitignore
  2. 13 0
      BUILD.bazel
  3. 15 0
      WORKSPACE

+ 3 - 0
.gitignore

@@ -0,0 +1,3 @@
+lib
+bin
+bazel-*

+ 13 - 0
BUILD.bazel

@@ -0,0 +1,13 @@
+load("@rules_python//python:defs.bzl", "py_binary")
+load("@deps//:requirements.bzl", "requirement")
+
+py_binary(
+    name = "main",
+    srcs = ["main.py"],
+    data = glob(["templates/*.mustache", "static/*"]),
+    deps = [
+        requirement("Markdown"),
+        requirement("pystache"),
+        requirement("PyYAML"),
+    ]
+)

+ 15 - 0
WORKSPACE

@@ -0,0 +1,15 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+http_archive(
+    name = "rules_python",
+    sha256 = "9fcf91dbcc31fde6d1edb15f117246d912c33c36f44cf681976bd886538deba6",
+    strip_prefix = "rules_python-0.8.0",
+    url = "https://github.com/bazelbuild/rules_python/archive/refs/tags/0.8.0.tar.gz",
+)
+
+load("@rules_python//python:pip.bzl", "pip_install")
+
+pip_install(
+   name = "deps",
+   requirements = "//:requirements.txt",
+)