On Fri, Jun 2, 2017, at 03:12 PM, Paul Moore wrote: > I'm struggling to understand why building a sdist in flit should need > a VCS. It bothers me that I'm missing something important about how > backends will work, that explains why (for example) you can't create a > sdist from an export of a VCS branch (i.e., without the VCS metadata).
It's the best way I've found to answer the question of which files should go in an sdist. The other things that we don't want to do include: 1. Get only the files needed to install and use the library, as we do for a wheel. Bad because people expect sdists to include things like docs and tests (if you put tests outside the package). 2. Tar up the whole directory containing flit.ini (/pyproject.toml). Bad because this will include things like built docs, VCS metadata, and random files you've made, so the sdist will be much bigger than necessary. 3. Hard-coded blacklist/whitelist. Not flexible enough - we can't cover all the different ways you might do docs, for instance. 4. Configurable blacklist/whitelist. This is what MANIFEST.in provides. I think we could come up with a more memorable syntax than MANIFEST.in - probably something like gitignore - but I'm not keen on adding back another boilerplate file. And the big problem I have with MANIFEST.in is that it's easy to forget to update it when you add some files that need to be in the sdist. I think the key realisation for me was that the files I want in an sdist are the same set of files in a fresh checkout of the VCS repo. I want it to be a static snapshot of what was in my VCS when I released (plus, for the sake of other tools, a couple of generated files). So the necessary information to make the sdist is there in the VCS. > Can you provide a pointer to the docs on flit's "build a sdist" > command, that explains the limitations? (I gather that this is in > development, so a pointer to the doc files in VCS is fine). I appreciate your optimism about my docs. ;-) _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig