You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/07/15 11:36:24 UTC

arrow git commit: ARROW-992: [Python] Try to set a __version__ in in-place local builds

Repository: arrow
Updated Branches:
  refs/heads/master f62db836a -> d46b7ea3e


ARROW-992: [Python] Try to set a __version__ in in-place local builds

This is better than having no version at all

Author: Wes McKinney <we...@twosigma.com>

Closes #841 from wesm/ARROW-992 and squashes the following commits:

40b86fa [Wes McKinney] Use setuptools_scm to determine __version__ in dev builds if possible


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/d46b7ea3
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/d46b7ea3
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/d46b7ea3

Branch: refs/heads/master
Commit: d46b7ea3e8c59778146d4587ab9b09461cf58634
Parents: f62db83
Author: Wes McKinney <we...@twosigma.com>
Authored: Sat Jul 15 13:35:19 2017 +0200
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Sat Jul 15 13:35:19 2017 +0200

----------------------------------------------------------------------
 python/pyarrow/__init__.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/d46b7ea3/python/pyarrow/__init__.py
----------------------------------------------------------------------
diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py
index 37aec6c..434722c 100644
--- a/python/pyarrow/__init__.py
+++ b/python/pyarrow/__init__.py
@@ -22,7 +22,11 @@ try:
     __version__ = get_distribution(__name__).version
 except DistributionNotFound:
    # package is not installed
-   pass
+    try:
+        import setuptools_scm
+        __version__ = setuptools_scm.get_version('../')
+    except (ImportError, LookupError):
+        __version__ = None
 
 
 from pyarrow.lib import cpu_count, set_cpu_count