Browse Source

Merge pull request #9020 from PhrozenByte/docs-build-src-version-1.4

Update install docs to include `SETUPTOOLS_SCM_PRETEND_VERSION` (v1.4 backport)
TW 3 weeks ago
parent
commit
aa39d63718
1 changed files with 13 additions and 5 deletions
  1. 13 5
      docs/installation.rst

+ 13 - 5
docs/installation.rst

@@ -331,12 +331,12 @@ Use the Cygwin installer to install the dependencies::
 Using pip
 ~~~~~~~~~
 
-Ensure to install the dependencies as described within :ref:`source-install`.
-
 Virtualenv_ can be used to build and install Borg without affecting
 the system Python or requiring root access.  Using a virtual environment is
 optional, but recommended except for the most simple use cases.
 
+Ensure to install the dependencies as described within :ref:`source-install`.
+
 .. note::
     If you install into a virtual environment, you need to **activate** it
     first (``source borg-env/bin/activate``), before running ``borg``.
@@ -380,11 +380,15 @@ locally::
 Using git
 ~~~~~~~~~
 
-Ensure to install the dependencies as described within :ref:`source-install`.
-
 This uses latest, unreleased development code from git.
 While we try not to break master, there are no guarantees on anything.
 
+Ensure to install the dependencies as described within :ref:`source-install`.
+
+Version metadata is obtained dynamically at install time using ``setuptools-scm``.
+Please ensure that your git repo either has correct tags, or provide the version
+manually using the ``SETUPTOOLS_SCM_PRETEND_VERSION`` environment variable.
+
 ::
 
     # get borg from github
@@ -394,11 +398,15 @@ While we try not to break master, there are no guarantees on anything.
     virtualenv --python=$(which python3) borg-env
     source borg-env/bin/activate   # always before using!
 
-    # install borg + dependencies into virtualenv
+    # install borg dependencies into virtualenv
     cd borg
     pip install -r requirements.d/development.txt
     pip install -r requirements.d/docs.txt  # optional, to build the docs
 
+    # set a borg version if setuptools-scm fails to do so automatically
+    export SETUPTOOLS_SCM_PRETEND_VERSION=
+
+    # install borg into virtualenv
     pip install -e .           # in-place editable mode
     or
     pip install -e .[pyfuse3]  # in-place editable mode, use pyfuse3