Skip to content

Static MANIFEST.in, clean up Makefile (less failing direct calls of setup.py)

Pierre Augier requested to merge topic/default/misc-dev-with-nox into branch/default

This addresses consequences of using setuptools and setuptools-scm.

  1. With setuptools-scm, versioned files are automatically included in the sdist, so it is better and simpler to use a static MANIFEST.in files to include only files which are not versioned (and potentially exclude versioned files that are not needed to build the wheels).

  2. Direct calls of setup.py are deprecated and may fails (if setuptools-scm is not installed). So they should be converted to calls of PEP 517 tools, like pip or python -m build.

  3. Building the doc and formatting Python files require requirements (docutils and black~=23.12.1). A good tool to ease such things is Nox. Here, I use it with a UV backend.

Mercurial developers only need to install Nox (typically with pipx) and optionally UV (with pipx or the UV installer) and the make targets will be run with the right tools and versions (black, docutils, build, ...).

A questions

Do we need to include generated doc files in the sdist? It does not seem to be a standard practice.

  • If we really need them, we have to add docutils as a build dependency and make sure that doc files are always generated when the sdist is built.
  • If we don't need them, we can potentially completely remove the MANIFEST.in file.
Edited by Pierre Augier

Merge request reports

Loading