diff mbox series

[3/6] pypi: Add packaging documentation for developers

Message ID 20260331145319.3125456-4-rob.woolley@windriver.com
State New
Headers show
Series [1/6] bitbake: Add checks for importing bb module | expand

Commit Message

Rob Woolley March 31, 2026, 2:53 p.m. UTC
Signed-off-by: Rob Woolley <rob.woolley@windriver.com>
---
 contrib/pypi/BUILD.md | 50 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 contrib/pypi/BUILD.md
diff mbox series

Patch

diff --git a/contrib/pypi/BUILD.md b/contrib/pypi/BUILD.md
new file mode 100644
index 00000000..b12fc083
--- /dev/null
+++ b/contrib/pypi/BUILD.md
@@ -0,0 +1,50 @@ 
+# Development Instructions
+
+## Requirements
+
+- Python >= 3.9
+- pip >= 19 (for installation)
+
+## Testing
+
+To lint the `bitbake-setup` pypi packaging, run the ruff tool.
+```bash
+ruff check bin/bitbake-setup contrib/pypi
+```
+
+The steps to build and test the `bitbake-setup` pypi packaging have been automated with the `bitbake-selftest` tool.  This tool automatically creates a Python virtual environment for you.
+
+Run the bitbake-selftest
+```bash
+BB_SKIP_PYPI_TESTS=no bin/bitbake-selftest -v bb.tests.setup.PyPIPackagingTest
+```
+
+## Packaging
+
+### Create the development sandbox
+
+To create the development sandbox run:
+```bash
+contrib/pypi/package-bitbake-setup.py
+cd packaging_workshop
+```
+
+### Building the package
+
+To install the development tools manually run:
+```bash
+python3 -m pip install -e '.[dev]'
+```
+
+To build a wheel (.whl) then use:
+```bash
+python3 -m build
+```
+
+This produces a wheel (.whl) file in the dist directory.  This may be installed using pip.
+
+### Installing the package
+
+```bash
+python3 -m pip install dist/bitbake_setup-*-py3-none-any.whl
+```