Skip to content

Installation: identify RPi platform #22

@jmtayloruk

Description

@jmtayloruk

Since I haven't worked out how to do optional extras as part of a pip install, it would be very useful to be able to identify reliably when the installation is taking place on a Pi. That would enable us to install picamera etc automatically as part of the pip install, but only on the Pi.

The various available platform-related keys are listed here: https://www.python.org/dev/peps/pep-0508/#environment-markers . However, it sounds like there may not be any that uniquely identify something as a Pi. [I’m not sure if there’s a way of specifying that the marker contains a string, rather than matches a string, but that condition might prove useful, I suspect].

Chas says: from past experience, platform_machine should report armv7 (or whatever). JT: but that does not distinguish the Pi from other embedded platforms, and I would like to be able to use e.g. Odroid as well.

Chas also says: try https://gist.github.com/barseghyanartur/94dbda2ad6f8937d6c307811ad51469a - we may need to update the 'value not in' list. JT: but that is a python script - can it be used in any way from pyproject.toml?? Or I suppose perhaps we could do it from a setup.py script, if it's not considered old-fashioned to also have code in that...

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions