robotpy / robotpy-installer

RobotPy installer program
MIT License
5 stars 11 forks source link

Distribute roboRIO wheels instead of ipks #49

Closed virtuald closed 3 years ago

virtuald commented 4 years ago

The more I think about this, the better it sounds. Would solve #41 , make CI cross-compiles significantly easier to accomplish, and probably provide a more consistent user experience if done right.

The only real catch here is that we would need a way to know that a binary opkg requirement was needed for some particular package -- for example, cscore requires OpenCV, and scipy requires fortran/blas. I imagine the best way to do this is to publish some list (similar to the way Packages works) that lets robotpy-installer know about these dependencies and let it handle it automatically.

virtuald commented 4 years ago

We will definitely try to do this for this fall.

One thing that I'd like to do is figure out how to add environment markers to include/exclude dependencies on the roborio. A notional version of this:

robotpy-halsim-gui; platform_system != 'roborio'

Environment markers are described in several places, including PEP 508. We'd need to figure out an appropriate marker that would differentiate the roborio platform, allow linux, but also work when downloading via pip. I think it might be doable by specifying Linux + CPU type, but maybe we can make it simpler?

virtuald commented 4 years ago

Here are the environment marker variables for roboRIO:

Python 3.8.1 (default, Dec 30 2019, 05:47:38) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os,sys,platform
>>> os.name
'posix'
>>> sys.platform
'linux'
>>> platform.machine()
'armv7l'
>>> platform.python_implementation()
'CPython'
>>> platform.release()
'4.14.87-rt49-cg-7.0.0f0-xilinx-zynq-189'
>>> platform.system()
'Linux'
>>> platform.version()
'#1 SMP PREEMPT RT Fri Mar 15 19:11:24 UTC 2019'
>>> '.'.join(platform.python_version_tuple()[:2])
'3.8'
>>> platform.python_version()
'3.8.1'
>>> sys.implementation.name
'cpython'
>>> sys.implementation.version
sys.version_info(major=3, minor=8, micro=1, releaselevel='final', serial=0)
virtuald commented 3 years ago

Taking steps towards doing this. Added a checklist to the description.