Skip to content

feat: Add mip package.json for all drivers. #338

@nedseb

Description

@nedseb

Description

Add a package.json file to each driver directory so that drivers can be installed individually on a MicroPython board using mip:

import mip
mip.install("github:steamicc/micropython-steami-lib/lib/bme280")

Context

mip is the official MicroPython package manager (replacement for the deprecated upip). It reads package.json files from GitHub repositories — it does not use PyPI. This is the most impactful distribution improvement we can make.

Tasks

  • Create lib/<driver>/package.json for all 16 drivers
  • Include all module files (__init__.py, device.py, const.py, exceptions.py) in the URL list
  • Add deps for drivers with inter-dependencies (daplink_flashdaplink_bridge)
  • Set version to match current project version (0.10.0)
  • Test on a board: `mip.install("github:steamicc/micropython-steami-lib/lib/bme280")` then `from bme280 import BME280`

package.json format

{
  "urls": [
    ["bme280/__init__.py", "bme280/__init__.py"],
    ["bme280/device.py", "bme280/device.py"],
    ["bme280/const.py", "bme280/const.py"],
    ["bme280/exceptions.py", "bme280/exceptions.py"]
  ],
  "version": "0.10.0"
}

Reference

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions