Description
What's the problem this feature will solve?
Currently, setuptools_scm does not support the ability to detect the version of the package if the package root is nested in the vcs root: pypa/setuptools-scm#357
It would be great if there could be some reconciliation on the pip or setuptools_scm side to better support version-control based version strings.
Describe the solution you'd like
As I understand it currently, pip install copies the contents of the package directory into a temp directory, then uses that to build the package.
setuptools_scm is then unable to retrieve the metadata of the vcs system, as the parent directory contains the configuration for the version control system. e.g. for git, the .git directory does not exist in a child directory.
I don't have a clear approach on a solution, but I'm happy to contribute the needed code. I guess as a starter, if there was a way to hook retrieval of information before the directory copy (e.g. letting setuptools_scm write a file somewhere).
conversely if there was a marker to the original source directory, allowing someone to read that information, then setuptools_scm could resolve the version control directory.
Alternative Solutions
Additional context
If there's a better forum to have this discussion, i'm happy to move the conversation there.