Update builddocs script for pants python not code python
Since we now have a difference between the python version for pants
and the python version for the code, we're now having to be explicit
about which one we use. This sucks
@@ -6,8 +6,11 @@ THIS_DIR=$(dirname "${BASH_SOURCE[0]}")
cd "${THIS_DIR}/.."
# Create a virtualenv from Pants
./pants export ::
+
+# Since Pants doesn't support 3.10, this won't use the `.python-version`.
+PYTHON_VERSION=$(ls "dist/export/python/virtualenv/")
# shellcheck disable=SC1090
-source "dist/export/python/virtualenv/$(cat .python-version)/bin/activate"
+source "dist/export/python/virtualenv/${PYTHON_VERSION}/bin/activate"
cd "${THIS_DIR}"
pip install wheel
