Packaging/Build tooling for monorepos, what are you using?

Hey all wanted, we are looking into combining several repos into one and are looking for tooling that would allows to generate arbitrary python packages from a single repository, It seems like pants fits the use case very well, other potential tools are bazel, but I dont’ have a lot of experience with it. I was wondering what are other people using out there.

Happy to hear your thoughts!

My setup’s pretty primitive. I put something like this at the top of a
module (or a package __init__.py):

 __version__ = '20230612-post'

 DISTINFO = {
     'keywords': ["python3"],
     'classifiers': [
         "Development Status :: 3 - Alpha",
         "Programming Language :: Python :: 3",
     ],
     'install_requires': [
         'arrow',
         'cs.context',
         'cs.csvutils',
         'cs.deco',
         'cs.fs',
         'cs.fstags',
         'cs.lex',
         'cs.logutils',
         'cs.mplutils',
         'cs.pfx',
         'cs.progress',
         'cs.psutils',
         'cs.resources',
         'cs.sqltags',
         'cs.tagset',
         'cs.timeseries',
         'cs.upd',
         'matplotlib',
         'python-dateutil',
         'typeguard',
     ],
     'entry_points': {
         'console_scripts': [
             'splink = cs.splink:main',
         ],
     },
 }

and have a custom script to figure out the required source files, check
various dependencies (eg imports vs the DISTINFO, anything outstanding
for the cs.* packages it depends on?, etc), then checks it out, makes a
pyproject.toml and README.md from the docstrings, computes a new
version, uses python -m build to make a wheel and sdist and twine
for the upload.

You can see from the DISTINFO fields that it’s not totally moved on

Alas, this does not recommend a tool for you!

Cheers,
Cameron Simpson cs@cskk.id.au