[ 
https://issues.apache.org/jira/browse/ARROW-2254?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386249#comment-16386249
 ] 

ASF GitHub Bot commented on ARROW-2254:
---------------------------------------

wesm closed pull request #1699: ARROW-2254: [Python] Ignore JS tags in local 
dev versions
URL: https://github.com/apache/arrow/pull/1699
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/pyarrow/__init__.py b/python/pyarrow/__init__.py
index 8cb4b3b9b..28ac98ea0 100644
--- a/python/pyarrow/__init__.py
+++ b/python/pyarrow/__init__.py
@@ -23,8 +23,22 @@
 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
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> [Python] Local in-place dev versions picking up JS tags
> -------------------------------------------------------
>
>                 Key: ARROW-2254
>                 URL: https://issues.apache.org/jira/browse/ARROW-2254
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Python
>            Reporter: Wes McKinney
>            Assignee: Uwe L. Korn
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.9.0
>
>
> I thought we had fixed this bug, but it's back:
> {code}
> $ ipython
> Python 3.5.2 | packaged by conda-forge | (default, Jul 26 2016, 01:32:08) 
> Type 'copyright', 'credits' or 'license' for more information
> IPython 6.1.0 -- An enhanced Interactive Python. Type '?' for help.
> In [1]: pa.__version__
> Out[1]: '0.3.1.dev52+g8b1c8118'
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to