On 2017-06-02 15:12:19 +0100 (+0100), 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). [...]
Unrelated to flit, but I have similar needs to be able to make sure my sdist version has a 1:1 correspondence to the name of a release tag in my VCS. Making a commit to embed a version number in a file in the VCS and then tagging that commit with the same version number is 1. racy and 2. duplication of information which can (and frequently has) led to confusing mistakes. As a result, I either need the VCS metadata present to be able to construct the version number which will get included in PKG-INFO _or_ I need a complex build wrapper which extracts the metadata prior to the filtered tree copy happening and plumbs it through (with an envvar or maybe spontaneously generating a file on disk) so that the sdist builder will know what version to embed.
Present day, this works fine as a setuptools entrypoint which can inspect the VCS metadata at sdist creation time. It would be unfortunate to lose such flexibility in whatever hook implementation