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

View file

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

View file

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