Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incase you wanted to build on MacOS #150

Open
mikeohyan opened this issue Feb 4, 2025 · 6 comments
Open

Incase you wanted to build on MacOS #150

mikeohyan opened this issue Feb 4, 2025 · 6 comments

Comments

@mikeohyan
Copy link

In case you wanted MacOS build instructions:

What you need before hand:

To confirm you can compile some C++ code, in a terminal you should be able to run: clang --version

Now to compile:

  • git clone https://github.com/robotpy/mostrobotpy.git to a working directory
  • in that directory, run uv init to setup python package management
  • install the package requirements: uv add -r rdev_requirements.txt
  • install numpy uv add numpy
  • uv add pip

Now to run compile command, instead of the bash script, we're going to run this instead.
In the working directory, run:
uv run python -m devtolls ci run

This will run for... a while, if this works you'll get a bunch of wheels (.whl) in <working dir>/dist

Now to use these wheels, in your python project (assuming you are using uv to manage packages):
Run uv pip install <whl path> for whatever you need.
There are packages that will have dependencies, if asked, install what's missing first.
Some packages are ok with the modifer: uv pip install --no-deps <whl path>

--
NB: Jumped through these steps to get NetworkTables working for a project.

@virtuald
Copy link
Member

virtuald commented Feb 4, 2025

We distribute wheels for macOS, is there a reason they don't work for you? Or are you just providing this because the instructions don't currently exist?

@mikeohyan
Copy link
Author

We thought you did! When trying to do a standard install (uv add ...), it didn't seem to be able to solve for MacOS. I think there was a wheel dependency that wasn't solving correctly for the 2025.* versions.

But also a nice to have, in case someone wanted to know where a wheel came from.

@virtuald
Copy link
Member

virtuald commented Feb 4, 2025

You should be able to do a uv pip install pyntcore to get ntcore support for macOS, there is a wheel published at https://pypi.org/project/pyntcore/#files

It is possible that our dependencies are weird and the uv project support might not be functioning, I haven't used uv very much.

We probably should document the build process better, maybe in build.md in the root directory.

@auscompgeek
Copy link
Member

My team uses uv for our robot code, and everything resolves correctly. I know because I tested it on both Linux and macOS 😄

@TheTripleV
Copy link
Member

I do understand that it's a bit confusing considering on pypi

  • ntcore is unrelated
  • networktables doesn't exist
  • pynetworktables is abandonware but nowhere does it point to pyntcore
  • pynetworktables2js is abandonware

@mikeohyan
Copy link
Author

You should be able to do a uv pip install pyntcore to get ntcore support for macOS, there is a wheel published at https://pypi.org/project/pyntcore/#files

It is possible that our dependencies are weird and the uv project support might not be functioning, I haven't used uv very much.

We probably should document the build process better, maybe in build.md in the root directory.

Just digging into uv for a bunch of new builds right now. It's the first manager that feels pretty good for python.

Happy to support, glad super responsive ppl are working on this. GL w/ your bots!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants