[NO TESTS] WIP
This commit is contained in:
parent
fe03f023e7
commit
8f72fc8d62
3 changed files with 17 additions and 18 deletions
23
WORKSPACE
23
WORKSPACE
|
@ -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",
|
|
||||||
)
|
)
|
||||||
|
|
|
@ -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"],
|
||||||
)
|
)
|
||||||
|
|
|
@ -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",
|
||||||
|
|
Loading…
Reference in a new issue