Here's how sdist generation works in enscons. enscons, a build tool that exists to prototype new Python packaging features, is just a set of tools for SCons that makes it easier to generate wheels and sdists. If targets with certain names exist (sdist, bdist_wheel) then the provide setup.py shim and new PEP 517 wrapper will interoperate with pip.
For enscons itself, the sdist build rule looks like sdist = env.SDist(source=FindSourceFiles() + ['PKG-INFO', 'setup.py', 'README.rst', 'CHANGES'])env.Alias('sdist', sdist) Enscons would be able to build its own sdist outside a repository, and it would include the listed files plus everything that is used to build the other targets (the wheel). A different package runs 'hg manifest' in a subprocess to feed to env.SDist(), a natural thing to do in this kind of build system. That one would not be able to build another sdist from an unpacked sdist. Enscons itself doesn't have a way to know whether sdist generation will succeed other than trying to run 'SCons sdist' against the user provided build script.
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig