robotpy / roborio-wheels

Builds Python wheels of non-RobotPy projects for RoboRIO
0 stars 6 forks source link

Adding adafruit libraries for ToF sensor and i2c multiplexer #8

Closed celttechie closed 2 years ago

virtuald commented 2 years ago

Both of those libraries appear to be pure python, so they shouldn't need to be built for roborio? Have you just tried installing them via robotpy-installer first?

celttechie commented 2 years ago

Both of those libraries appear to be pure python, so they shouldn't need to be built for roborio? Have you just tried installing them via robotpy-installer first?

Yes, but I got errors which is why I started going down this road. Maybe I misunderstand the error?

$ robotpy-installer download adafruit-circuitpython-vl6180x
Looking in links: https://www.tortall.net/~robotpy/wheels/2022/roborio
←[1;33mwarning←[0m: ←[1mmissing-index-doctype←[0m

←[33m×←[0m The package index page being used does not have a proper HTML doctype declaration.
←[33m╰─>←[0m Problematic URL: ←[4;94mhttps://www.tortall.net/←[0m~robotpy/wheels/←[1;36m2022←[0m/roborio/

←[1;35mnote←[0m: This is an issue with the page at the URL mentioned above.
←[1;36mhint←[0m: You might need to reach out to the owner of that package index, to get this fixed. See ←[4;94mhttps://github.com/pypa/pip/issues/10825←[0m for context.
←[31mERROR: Could not find a version that satisfies the requirement adafruit-circuitpython-vl6180x (from versions: none)←[0m←[31m
←[0m←[31mERROR: No matching distribution found for adafruit-circuitpython-vl6180x←[0m←[31m
←[0mError: pip download failed
virtuald commented 2 years ago

Ugh. The problem is that the library isn't distributed as a wheel (see https://pypi.org/project/adafruit-circuitpython-vl6180x/#files for the downloads), and I seem to recall that pip was being stupid about non-wheel packages when we implemented robotpy-installer's download functionality.

We need a better story for dealing with this, but putting it in roborio-wheels isn't really the right answer. I'll think about it tonight.. but for now, you should be able to do 'pip download NAME', and then move all of the files it downloads to ~/wpilib/2022/robotpy/pip_cache/

celttechie commented 2 years ago

Thanks Dustin, I'll do that.

auscompgeek commented 2 years ago

FWIW, looks like they have public CI/CD builds. Could try updating their builds to include wheels.