jorisvandenbossche commented on code in PR #35907:
URL: https://github.com/apache/arrow/pull/35907#discussion_r1231416154


##########
docs/source/conf.py:
##########
@@ -158,11 +206,18 @@
 # built documents.
 #
 # The short X.Y version.
-version = os.environ.get('ARROW_DOCS_VERSION',
-                         pyarrow.__version__)
+try:
+    version = os.environ.get('ARROW_DOCS_VERSION',
+                             pyarrow.__version__)

Review Comment:
   > So yeah, we could default to an empty string if `ARROW_DOCS_VERSION` is 
not specified.
   
   I think it would be nice to still use `pyarrow.__version__` _if_ it is 
installed, and the env variable is not set. It's nice to see a correct version 
number when building the docs locally for development (when you typically don't 
specify that env variable).
   
   You could for example use `pyarrow_version =  pyarrow.__version` and 
`pyarrow_version = ""` in the if/else branches above when trying to import 
pyarrow, and then use that variable here (`version = 
os.environ.get('ARROW_DOCS_VERSION', pyarrow_version)`)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to