This is an automated email from the ASF dual-hosted git repository.
wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 55bdae5 ARROW-2254: [Python] Ignore JS tags in local dev versions
55bdae5 is described below
commit 55bdae57c5f712d691e928899518fa41ec2d8acd
Author: Korn, Uwe <[email protected]>
AuthorDate: Mon Mar 5 10:51:29 2018 -0500
ARROW-2254: [Python] Ignore JS tags in local dev versions
Author: Korn, Uwe <[email protected]>
Closes #1699 from xhochy/ARROW-2254 and squashes the following commits:
3c41b363 <Korn, Uwe> ARROW-2254: Ignore JS tags in local dev versions
---
python/pyarrow/__init__.py | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py
index 8cb4b3b..28ac98e 100644
--- a/python/pyarrow/__init__.py
+++ b/python/pyarrow/__init__.py
@@ -23,8 +23,22 @@ try:
except DistributionNotFound:
# package is not installed
try:
+ # This code is duplicated from setup.py to avoid a dependency on each
+ # other.
+ def parse_version(root):
+ from setuptools_scm import version_from_scm
+ import setuptools_scm.git
+ describe = setuptools_scm.git.DEFAULT_DESCRIBE + " --match
'apache-arrow-[0-9]*'"
+ # Strip catchall from the commandline
+ describe = describe.replace("--match *.*", "")
+ version = setuptools_scm.git.parse(root, describe)
+ if not version:
+ return version_from_scm(root)
+ else:
+ return version
+
import setuptools_scm
- __version__ = setuptools_scm.get_version('../')
+ __version__ = setuptools_scm.get_version('../', parse=parse_version)
except (ImportError, LookupError):
__version__ = None
--
To stop receiving notification emails like this one, please contact
[email protected].