setuptools_scm icon indicating copy to clipboard operation
setuptools_scm copied to clipboard

Document the existence of fallback_root

Open sbraz opened this issue 4 years ago • 0 comments
trafficstars

Hi, It took me a long time to understand why setuptools_scm.get_version(fallback_root="..") didn't work inside a subfolder of a PyPI tarball.

Would it be possible to mention fallback_root somewhere in README? Maybe changing the programmatic usage like this?

diff --git a/README.rst b/README.rst
index ade4d86..0a9cdf9 100644
--- a/README.rst
+++ b/README.rst
@@ -145,7 +145,7 @@ than the project's root, you can use:
 .. code:: python
 
     from setuptools_scm import get_version
-    version = get_version(root='..', relative_to=__file__)
+    version = get_version(root='..', fallback_root='..', relative_to=__file__)
 
 See `setup.py Usage`_ above for how to use this within ``setup.py``.
 

sbraz avatar Apr 10 '21 20:04 sbraz