[NO TESTS] WIP

This commit is contained in:
Reid 'arrdem' McKenzie 2021-08-29 19:23:39 -06:00
parent 928a3a5f84
commit 0b5912174a
3 changed files with 17 additions and 18 deletions

View file

@ -35,11 +35,14 @@ bazel_skylib_workspace()
####################################################################################################
# Python support
####################################################################################################
register_toolchains("//tools/python:toolchain")
# Using rules_python at a more recent SHA than the last release like a baws
git_repository(
name = "rules_python",
remote = "https://github.com/bazelbuild/rules_python.git",
tag = "0.3.0",
# commit = "...",
)
# pip package pinnings need to be initialized.
@ -49,19 +52,15 @@ load("@rules_python//python:pip.bzl", "pip_install")
pip_install(
name = "arrdem_source_pypi",
requirements = "//tools/python:requirements.txt",
python_interpreter = "python3",
)
git_repository(
# git_repository(
# name = "rules_zapp",
# remote = "https://github.com/arrdem/rules_zapp.git",
# tag = "0.1.2",
# )
local_repository(
name = "rules_zapp",
remote = "https://github.com/arrdem/rules_zapp.git",
tag = "0.1.1",
)
####################################################################################################
# Postscript
####################################################################################################
# Do toolchain nonsense to use py3
register_toolchains(
"//tools/python:toolchain",
path = "/home/arrdem/doc/hobby/programming/lang/python/rules_zapp",
)

View file

@ -14,7 +14,8 @@ exports_files([
py_runtime(
name = "python_runtime",
interpreter_path = "/usr/bin/python3",
files = [],
interpreter_path = "/usr/bin/python3.9",
python_version = "PY3",
visibility = ["//visibility:public"],
)

View file

@ -3,6 +3,8 @@ load("@arrdem_source_pypi//:requirements.bzl",
)
load("@rules_python//python:defs.bzl",
"py_runtime",
"py_runtime_pair",
_py_binary = "py_binary",
_py_test = "py_test",
_py_library = "py_library",
@ -210,9 +212,7 @@ def py_project(name=None,
py_binary(
name=name,
main=main,
srcs=lib_srcs,
deps=(lib_deps or []) + (main_deps or []),
data=lib_data,
deps=(main_deps or []) + [lib_name],
imports=[
"src/python",
"src/resources",
@ -225,8 +225,7 @@ def py_project(name=None,
zapp_binary(
name=name + ".zapp",
main=main,
srcs=lib_srcs,
deps=lib_deps,
deps=(main_deps or []) + [lib_name],
data=lib_data,
imports=[
"src/python",