Getty Ritter 3 days ago
parent
commit
8dda64b646
13 changed files with 524 additions and 19 deletions
  1. 0 0
      .gitignore
  2. 10 4
      BUILD.bazel
  3. 20 0
      MODULE.bazel
  4. 490 0
      MODULE.bazel.lock
  5. 3 0
      PROTAGONIST
  6. 0 15
      WORKSPACE
  7. 0 0
      projects.yaml
  8. 0 0
      pyvenv.cfg
  9. 1 0
      requirements.txt
  10. 0 0
      static/main.css
  11. 0 0
      static/main.js
  12. 0 0
      static/raleway.ttf
  13. 0 0
      templates/main.mustache

+ 0 - 0
.gitignore


+ 10 - 4
BUILD.bazel

@@ -1,13 +1,14 @@
+load("@rules_python//python:pip.bzl", "compile_pip_requirements")
 load("@rules_python//python:defs.bzl", "py_binary")
-load("@deps//:requirements.bzl", "requirement")
 
 py_binary(
     name = "generate",
     srcs = ["generate.py"],
     deps = [
-        requirement("chevron"),
-        requirement("markdown"),
-        requirement("PyYAML"),
+        "@pypi//chevron:pkg",
+        "@pypi//importlib_metadata:pkg",
+        "@pypi//markdown:pkg",
+        "@pypi//pyyaml:pkg",
     ]
 )
 
@@ -32,3 +33,8 @@ genrule(
     outs = ["output"],
     cmd = "$(location :generate) $(location output) $(location :projects.yaml) $(locations :static) $(locations :templates)",
 )
+
+compile_pip_requirements(
+    name = "requirements",
+    requirements_txt = "requirements.txt",
+)

+ 20 - 0
MODULE.bazel

@@ -0,0 +1,20 @@
+module(name = "www_gdritter_site")
+
+bazel_dep(name = "rules_python", version = "1.8.0-rc3")
+
+python = use_extension("@rules_python//python/extensions:python.bzl", "python")
+python.toolchain(python_version = "3.9.25")
+
+use_repo(
+    python,
+    python_3_9 = "python_3_9_25",
+)
+
+pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
+pip.parse(
+    download_only = True,
+    hub_name = "pypi",
+    python_version = "3.9.25",
+    requirements_lock = "//:requirements.txt",
+)
+use_repo(pip, "pypi")

File diff suppressed because it is too large
+ 490 - 0
MODULE.bazel.lock


+ 3 - 0
PROTAGONIST

@@ -0,0 +1,3 @@
+SERVER=rosencrantz
+TYPE=static
+DIR=/srv/http/gdr/www

+ 0 - 15
WORKSPACE

@@ -1,15 +0,0 @@
-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",
-)

+ 0 - 0
projects.yaml


+ 0 - 0
pyvenv.cfg


+ 1 - 0
requirements.txt

@@ -1,3 +1,4 @@
 chevron==0.14.0
 Markdown==3.3.6
 PyYAML==6.0
+importlib-metadata

+ 0 - 0
static/main.css


+ 0 - 0
static/main.js


+ 0 - 0
static/raleway.ttf


+ 0 - 0
templates/main.mustache