Skip to content

Commit

Permalink
[python] fold tockloader into top-level pyproject.toml
Browse files Browse the repository at this point in the history
Tock only need to make tockloader available. Instead of having a single
dependency in a dedicated tockloader_requirements.in and pin separately,
fold it into the top-level pyproject.toml.

Signed-off-by: Gary Guo <[email protected]>
  • Loading branch information
nbdd0121 committed Sep 18, 2024
1 parent 5676639 commit e5b2f14
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 86 deletions.
2 changes: 0 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ tock_repos(
#tock = "../tock",
#libtock = "../libtock-rs",
)
load("@tockloader_deps//:requirements.bzl", install_tockloader_python_deps="install_deps")
install_tockloader_python_deps()

# OpenOCD
load("//third_party/openocd:repos.bzl", "openocd_repos")
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ dependencies = [
# Dependency of sw/host/vendor/google_verible_verilog_syntax_py
"anytree==2.8.0",

# Dependency of third_party/tock
"tockloader==1.13",

# Development version with OT-specific changes
"fusesoc@https://github.com/lowRISC/fusesoc/archive/refs/tags/ot-0.5.dev0.zip",

Expand Down
31 changes: 28 additions & 3 deletions python-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
anytree==2.8.0 \
--hash=sha256:14c55ac77492b11532395049a03b773d14c7e30b22aa012e337b1e983de31521 \
--hash=sha256:3f0f93f355a91bc3e6245319bf4c1d50e3416cc7a35cc1133c1ff38306bbccab
argcomplete==3.5.0 \
--hash=sha256:4349400469dccfb7950bb60334a680c58d88699bff6159df61251878dc6bf74b \
--hash=sha256:d4bcf3ff544f51e16e54228a7ac7f486ed70ebf2ecfe49a63a91171c76bf029b
attrs==23.1.0 \
--hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \
--hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015
Expand Down Expand Up @@ -104,9 +107,14 @@ chipwhisperer @ https://github.com/newaetech/chipwhisperer-minimal/archive/26431
click==8.1.7 \
--hash=sha256:ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28 \
--hash=sha256:ca9853ad459e787e2192211578cc907e7594e294c7ccc834310722b41b9ca6de
colorama==0.4.6 \
--hash=sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44 \
--hash=sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6
commonmark==0.9.1 \
--hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \
--hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9
crcmod==1.7 \
--hash=sha256:dc7051a0db5f2bd48665a990d3ec1cc305a466a77358ca4492826f41f283601e
cssselect==1.2.0 \
--hash=sha256:666b19839cfaddb9ce9d36bfe4c969132c647b92fc9088c4e23f786b30f1b3dc \
--hash=sha256:da1885f0c10b60c03ed5eccbb6b68d6eff248d91976fcde348f395d54c9fd35e
Expand Down Expand Up @@ -449,6 +457,9 @@ prefixed==0.7.0 \
--hash=sha256:537b0e4ff4516c4578f277a41d7104f769d6935ae9cdb0f88fed82ec7b3c0ca5
premailer==3.8.0 \
--hash=sha256:4d4e157244cee945a00c14feaa9e6a3aeb2faf2623ff6a8ba08afdf505fa0f25
prompt-toolkit==3.0.36 \
--hash=sha256:3e163f254bef5a03b146397d7c1963bd3e2812f0964bb9a24e6ec761fd28db63 \
--hash=sha256:aa64ad242a462c5ff0363a7b9cfe696c20d55d9fc60c11fd8e632d064804d305
py==1.11.0 \
--hash=sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719 \
--hash=sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378
Expand Down Expand Up @@ -586,6 +597,9 @@ pyyaml==6.0 \
--hash=sha256:dbad0e9d368bb989f4515da330b88a057617d16b6a8245084f1b05400f24609f \
--hash=sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174 \
--hash=sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5
questionary==2.0.1 \
--hash=sha256:8ab9a01d0b91b68444dff7f6652c1e754105533f083cbe27597c8110ecc230a2 \
--hash=sha256:bcce898bf3dbb446ff62830c86c5c6fb9a22a54146f0f5597d3da43b10d8fc8b
requests==2.31.0 \
--hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \
--hash=sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1
Expand All @@ -598,6 +612,8 @@ semantic-version==2.10.0 \
simplesat==0.8.2 \
--hash=sha256:1943f32735b03b048e20953a0145b2b61d2eb7a9dcc471a74f214afe9fa8d858 \
--hash=sha256:76dd637db54c998badb988baafbc2bd4cc6689364580588487bc2634a6ab55fd
siphash==0.0.1 \
--hash=sha256:aee97fe95e09a2995819c058a5e4ac6d96661a898d7fe0ad55e3b72c9a31d461
six==1.16.0 \
--hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \
--hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254
Expand All @@ -612,9 +628,18 @@ tabulate==0.8.10 \
--hash=sha256:6c57f3f3dd7ac2782770155f3adb2db0b1a269637e42f27599925e64b114f519
termcolor==1.1.0 \
--hash=sha256:1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b
tockloader==1.13.0 \
--hash=sha256:0f51cdb3a3d5f2cd60796a0f2922e26a8298376b357a32f6a2d72d153bf6795d \
--hash=sha256:276a9deb4416af48b847e8478739dd3a6c28a92a4a30dc0d8cb9acafdaacc76c
toml==0.10.2 \
--hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \
--hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f
tomli==2.0.1 \
--hash=sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc \
--hash=sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f
tqdm==4.66.5 \
--hash=sha256:90279a3770753eafc9194a0364852159802111925aa30eb3f9d85b0e805ac7cd \
--hash=sha256:e1020aef2e5096702d8a025ac7d16b1577279c9d63f8375b63083e9a5f0fcbad
typer==0.6.1 \
--hash=sha256:2d5720a5e63f73eaf31edaa15f6ab87f35f0690f8ca233017d7d23d743a91d73 \
--hash=sha256:54b19e5df18654070a82f8c2aa1da456a4ac16a2a83e6dcd9f170e291c56338e
Expand Down Expand Up @@ -658,9 +683,9 @@ uv==0.4.10 \
--hash=sha256:bc99e6b45303f0881a8dc199f0b7ea8261dd1779e576e8477a7721ceeeaafcc7 \
--hash=sha256:e99e3f761875962942e0743b868bd666021d5e14c3df494e820ef8f45fb88578 \
--hash=sha256:ff9046a8c5e836e892ac7741e672ee016e92e55c659fa8195595df65a1f3accf
wcwidth==0.2.6 \
--hash=sha256:795b138f6875577cd91bba52baf9e445cd5118fd32723b460e30a0af30ea230e \
--hash=sha256:a5220780a404dbe3353789870978e472cfe477761f06ee55077256e509b156d0
wcwidth==0.2.13 \
--hash=sha256:3da69048e4540d84af32131829ff948f1e022c1c6bdb8d6102117aac784f6859 \
--hash=sha256:72ea0c06399eb286d978fdedb6923a9eb47e1c486ce63e9b4e64fc18303972b5
yapf==0.32.0 \
--hash=sha256:8fea849025584e486fd06d6ba2bed717f396080fd3cc236ba10cb97c4c51cf32 \
--hash=sha256:a3f5085d37ef7e3e004c4ba9f9b3e40c54ff1901cd111f05145ae313a7c67d1b
Expand Down
2 changes: 1 addition & 1 deletion third_party/tock/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ crates_vendor(

py_console_script_binary(
name = "tockloader",
pkg = "@tockloader_deps//tockloader",
pkg = "@ot_python_deps//tockloader",
)
7 changes: 0 additions & 7 deletions third_party/tock/repos.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
load("@//rules:repo.bzl", "bare_repository", "http_archive_or_local")
load("@//rules:rust.bzl", "crate_build")
load("@python3//:defs.bzl", "interpreter")
load("@rules_python//python:pip.bzl", "pip_parse")

# Exports the kernel_layout.ld file so it can be used in opentitan rules.
_KERNEL_LAYOUT = """
Expand Down Expand Up @@ -297,9 +296,3 @@ def tock_repos(tock = None, libtock = None, elf2tab = None):
strip_prefix = "elf2tab-2f0e2f0ef01e37799850d1b12f48b93a0b32a203",
build_file = Label("//third_party/tock:BUILD.elf2tab.bazel"),
)

pip_parse(
name = "tockloader_deps",
python_interpreter_target = interpreter,
requirements_lock = "//:third_party/tock/tockloader_requirements.txt",
)
5 changes: 0 additions & 5 deletions third_party/tock/tockloader_requirements.in

This file was deleted.

68 changes: 0 additions & 68 deletions third_party/tock/tockloader_requirements.txt

This file was deleted.

0 comments on commit e5b2f14

Please sign in to comment.