@@ -37,71 +37,61 @@ generally dependent on the former. Platform info is gathered from:
37
37
38
38
- Distribution-specific files such as /etc/armbian-release.
39
39
40
- Dependencies
41
- =============
42
- This driver depends on:
40
+ Dependencies
41
+ =============
42
+ This driver depends on:
43
43
44
- * ` Adafruit CircuitPython < https://github.com/adafruit/circuitpython >`_
44
+ * Python 3.5 or higher
45
45
46
- Please ensure all dependencies are available on the CircuitPython filesystem.
47
- This is easily achieved by downloading
48
- `the Adafruit library and driver bundle <https://circuitpython.org/libraries >`_.
46
+ Installing from PyPI
47
+ =====================
49
48
50
- Installing from PyPI
51
- =====================
52
- .. note :: This library is not available on PyPI yet. Install documentation is included
53
- as a standard element. Stay tuned for PyPI availability!
49
+ On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
50
+ PyPI <https://pypi.org/project/Adafruit-PlatformDetect/> `_. To install for current user:
54
51
55
- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
56
- If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
52
+ .. code-block :: shell
57
53
58
- On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
59
- PyPI <https://pypi.org/project/Adafruit-PlatformDetect/> `_. To install for current user:
54
+ pip3 install Adafruit-PlatformDetect
60
55
61
- .. code-block :: shell
56
+ To install system-wide (this may be required in some cases):
62
57
63
- pip3 install Adafruit-PlatformDetect
58
+ .. code-block :: shell
64
59
65
- To install system-wide (this may be required in some cases):
60
+ sudo pip3 install Adafruit-PlatformDetect
66
61
67
- .. code-block :: shell
62
+ To install in a virtual environment in your current project:
68
63
69
- sudo pip3 install Adafruit-PlatformDetect
64
+ .. code-block :: shell
70
65
71
- To install in a virtual environment in your current project:
66
+ mkdir project-name && cd project-name
67
+ python3 -m venv .env
68
+ source .env/bin/activate
69
+ pip3 install Adafruit-PlatformDetect
72
70
73
- .. code-block :: shell
71
+ Usage Example
72
+ =============
74
73
75
- mkdir project-name && cd project-name
76
- python3 -m venv .env
77
- source .env/bin/activate
78
- pip3 install Adafruit-PlatformDetect
74
+ .. code-block :: python
79
75
80
- Usage Example
81
- =============
76
+ from adafruit_platformdetect import Detector
77
+ detector = Detector()
78
+ print (" Chip id: " , detector.chip.id)
79
+ print (" Board id: " , detector.board.id)
82
80
83
- .. code-block :: python
81
+ # Check for specific board models:
82
+ print (" Pi 3B+? " , detector.board.RASPBERRY_PI_3B_PLUS )
83
+ print (" BBB? " , detector.board.BEAGLEBONE_BLACK )
84
+ print (" Orange Pi PC? " , detector.board.ORANGE_PI_PC )
85
+ print (" generic Linux PC? " , detector.board.GENERIC_LINUX_PC )
84
86
85
- from adafruit_platformdetect import Detector
86
- detector = Detector()
87
- print (" Chip id: " , detector.chip.id)
88
- print (" Board id: " , detector.board.id)
89
-
90
- # Check for specific board models:
91
- print (" Pi 3B+? " , detector.board.RASPBERRY_PI_3B_PLUS )
92
- print (" BBB? " , detector.board.BEAGLEBONE_BLACK )
93
- print (" Orange Pi PC? " , detector.board.ORANGE_PI_PC )
94
- print (" generic Linux PC? " , detector.board.GENERIC_LINUX_PC )
95
-
96
- Contributing
97
- ============
87
+ Contributing
88
+ ============
98
89
99
- Contributions are welcome! Please read our `Code of Conduct
100
- <https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect/blob/master/CODE_OF_CONDUCT.md> `_
101
- before contributing to help this project stay welcoming.
90
+ Contributions are welcome! Please read our `Code of Conduct
91
+ <https://github.com/adafruit/Adafruit_CircuitPython_PlatformDetect/blob/master/CODE_OF_CONDUCT.md> `_
92
+ before contributing to help this project stay welcoming.
102
93
103
- Documentation
104
- =============
94
+ Documentation
95
+ =============
105
96
106
- For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1 >`_.
107
-
97
+ For information on building library documentation, please check out `this guide <https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs#sphinx-5-1 >`_.
0 commit comments