Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ Development environment
-----------------------

To install all robotpy packages in [editable mode](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#working-in-development-mode)
run this:
first run this to install dependencies:

./rdev.sh install-prereqs

Then each time you want to build everything:

./rdev.sh develop

Expand All @@ -55,7 +59,7 @@ rebuild an individual package:

./rdev.sh develop NAME

It can be a slow process,see the [robotpy-build documentation](https://robotpy-build.readthedocs.io/en/stable/tips.html)
It can be a slow process, see the [semiwrap documentation](https://semiwrap.readthedocs.io/en/stable/tips.html)
for tips to make it more efficient.

Cross Compilation
Expand Down
25 changes: 25 additions & 0 deletions devtools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
from .ctx import Context
from . import ci
from . import update_pyproject
from . import util


#
# Environment variables for configuring the builds
Expand Down Expand Up @@ -61,6 +63,29 @@ def develop(ctx: Context, package: str):
project.develop()


@main.command()
@click.pass_obj
def install_prereqs(ctx: Context):
"""Install developer build dependencies before running develop"""

reqs = set()
reqs.add("editables")
reqs.add("numpy")
reqs.add("pytest")

repo_deps = set()

for project in ctx.subprojects.values():
with ctx.handle_exception(project.name):
repo_deps.add(project.pyproject_name)

for req in project.build_requires + project.dependencies:
if req.name not in repo_deps:
reqs.add(req)

util.run_pip("install", *map(str, reqs))


@main.command()
@click.pass_obj
def scan_headers(ctx: Context):
Expand Down
2 changes: 1 addition & 1 deletion rdev.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ semiwrap = "~=0.1.7"
hatch-meson = "~=0.1.0b2"
hatch-nativelib = "~=0.2.0"
hatch-robotpy = "~=0.2"

# robotpy-cli = "~=2026.0.0b1"

[subprojects."robotpy-native-wpiutil"]
py_version = "native"
Expand Down
Loading