I don't see how manually generating the pkg manifest will help; perhaps I'm missing the point you're trying to make. In the case of MELPA the version will always be overridden regardless of the presence of a package manifest, and in most of my packages I'm adding show-package-version command to help with the bug reports. It seems to me that package version extraction is a pretty common problem that deserves a simple solution. 

On Wed, Dec 29, 2021, at 8:22 PM, Thierry Volpiatto wrote:
Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Basically I want to extract the package version from the *Version:*
>>  header instead of having to duplicate it. I know of
>>  package-get-package-version, but I assume it won't work for people
>>  who didn't install my packages via package.el.  
>
> `package-get-version` should work but only if they had the foresight to
> put it in a directory whose name ends in "-<version>" or whose name is
> just `cider` (i.e. the name of your package) :-(

Why doing this instead of adding such infos to *.pkg.el file of package?
IIRC package.el is creating such file from source file headers instead
of using the existing file if it exists (I already asked for this in the
past).

-- 
Thierry