mbox series

[v2,00/10] Package bitbake-setup for PyPI

Message ID 20260127160508.3392732-1-rob.woolley@windriver.com
Headers show
Series Package bitbake-setup for PyPI | expand

Message

Rob Woolley Jan. 27, 2026, 4:04 p.m. UTC
Thanks for the feedback from the 1st series.  I included all requested
changes:
   * Moved packaging files from top-level to contrib/pypi
   * Created package-bitbake-setup.py to create a new workspace to
     build the package and be compliant with PEP 517
   * Changed the title of patch #4 to start with bitbake-setup:
   * Converted setup.cfg to pyproject.toml
   * Remove old license classifiers
   * Made AND operator uppercase for license entry
   * Set the minimum Python requirement to 3.9
   * Created a custom README.md and BUILD.md for bitbake-setup
   * Changed the URL to https://git.openembedded.org/bitbake/
   * Added support for nox to automate the packaging including
     linting, building, and testing

There was a question about the wildcards in the includes section.
In this context they are not used for filename globbing and instead
denote to include any Python sub-modules as well.  See the Python
documentation for details:
https://setupttools.pypa.io/en/latest/userguide/package_discovery.html

The bitbake-setup script is no longer being turned into a module in
the git repository.  Instead it is being done by the script.  The
rationale for doing this is that it:
   * ensures the module works reliably on all platforms
   * avoids shebang and path issues
   * places nicely with wheels, venvs, and zipapps
   * easier to test

I did make an attempt to ensure that pyproject.toml and noxfile.py
are compatible with older tools.  Building the wheel using the
pyprojet.toml should be supported with pip >=19.

Wheels built newer versions of pip should remain backwards
compatible with pip when installing on older systems.

Outstanding:
   * Determine a release strategy and version scheme
   * Document steps for publishing the module to PyPI

To run the automated tests all that should be required is to
install the python3-nox package or nox Python module.  Then run

nox -s lint
nox -s build
nox -s tests

Rob Woolley (10):
  bitbake-setup: Add the conditional script stanza
  bitbake-setup: Add pypi packaging
  bitbake-setup: Remove extraneous variable from str.format()
  bitbake-setup: Sort and format imports
  bitbake-setup: Resolve unused loop control variables
  bitbake-setup: Fix ambiguous variable names
  bitbake-setup: Remove unused stdout variable
  bitbake-setup: Replace f-string without placeholders
  bitbake-setup: Remove unused Namespace import
  bitbake-setup: Remove unused parser_settings_list

 .gitignore                            |  1 +
 bin/bitbake-setup                     | 76 ++++++++++-----------
 contrib/pypi/BUILD.md                 | 57 ++++++++++++++++
 contrib/pypi/LICENSE                  |  9 +++
 contrib/pypi/README.md                | 42 ++++++++++++
 contrib/pypi/noxfile.py               | 30 +++++++++
 contrib/pypi/package-bitbake-setup.py | 93 +++++++++++++++++++++++++
 contrib/pypi/pyproject.toml           | 97 +++++++++++++++++++++++++++
 contrib/pypi/tests/test_install.py    | 17 +++++
 9 files changed, 383 insertions(+), 39 deletions(-)
 create mode 100644 contrib/pypi/BUILD.md
 create mode 100644 contrib/pypi/LICENSE
 create mode 100644 contrib/pypi/README.md
 create mode 100644 contrib/pypi/noxfile.py
 create mode 100755 contrib/pypi/package-bitbake-setup.py
 create mode 100644 contrib/pypi/pyproject.toml
 create mode 100644 contrib/pypi/tests/test_install.py