[Distutils] Builders vs Installers

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Mar 27 18:41:00 CET 2013


PJ Eby <pje <at> telecommunity.com> writes:

> The challenge here is again the distinction between raw source and
> sdist, and the interaction with revision control.  Either there has to
> be some way to tell MEBS (i.e. the overall build system) what tool
> you're using to generate that JSON, or you have to check a generated
> file into revision control, and make sure you've updated it.  (Which
> is error prone, even if you don't mind checking generated files into
> revision control.)
> 
> This strongly suggests there needs to be *some* human-editable way to
> at *least* specify what tool you're using to generate the JSON with.

There are no doubt many possible workflows, but one such is:

metadata input files - any number, hand-edited, checked into source control
metadata merge tool - creates JSON metadata from input files
JSON metadata - produced by tool, so not checked in

If the "merge tool" (which could be a simple Python script) is custom to a
project, it can be checked into source control in that project. If it is used
across multiple projects, it is maintained as a separate tool in its own repo
and, if you are just using it but not maintaining it, it becomes part of your
build toolset (like sphinx-build). Actually, the doc tools seem to be a good
analogy - create a useful format which is a pain to edit by hand (HTML that
looks nice in a browser) from some checked in sources which are reasonable
to edit by hand (.rst) + a merge tool (Sphinx).

The merge tool seems similar in kind to the release.py script that many
projects have, which creates release distribution files, bumps version numbers,
registers and uploads to PyPI.

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list