Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-3012

[Python] Installation crashes with setuptools_scm error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Python
    • OS: MacOS High Sierra (10.13.5)
      Python: 3.7.0
      Cython: 0.28.5

    Description

      To reproduce, on Python 3.7.0: 

      pip3.7 install pyarrow==0.10.0
      

       

      The result is a crash:

      Collecting pyarrow
      Using cached https://files.pythonhosted.org/packages/c0/a0/f7e9dfd8988d94f4952f9b50eb04e14a80fbe39218520725aab53daab57c/pyarrow-0.10.0.tar.gz
      Complete output from command python setup.py egg_info:
      Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/setup.py", line 545, in <module>
      url="https://arrow.apache.org/"
      File "/Users/tux/.pyenv/versions/3.7.0/lib/python3.7/site-packages/setuptools/__init__.py", line 131, in setup
      return distutils.core.setup(**attrs)
      File "/Users/tux/.pyenv/versions/3.7.0/lib/python3.7/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
      File "/Users/tux/.pyenv/versions/3.7.0/lib/python3.7/site-packages/setuptools/dist.py", line 370, in __init__
      k: v for k, v in attrs.items()
      File "/Users/tux/.pyenv/versions/3.7.0/lib/python3.7/distutils/dist.py", line 292, in __init__
      self.finalize_options()
      File "/Users/tux/.pyenv/versions/3.7.0/lib/python3.7/site-packages/setuptools/dist.py", line 529, in finalize_options
      ep.load()(self, ep.name, value)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/integration.py", line 23, in version_keyword
      dist.metadata.version = get_version(**value)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/__init__.py", line 135, in get_version
      parsed_version = _do_parse(config)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/__init__.py", line 77, in _do_parse
      parse_result = _call_entrypoint_fn(config, config.parse)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/__init__.py", line 40, in _call_entrypoint_fn
      return fn(config.absolute_root)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/setup.py", line 498, in parse_version
      return version_from_scm(root)
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/__init__.py", line 28, in version_from_scm
      return _version_from_entrypoint(root, "setuptools_scm.parse_scm")
      File "/private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/.eggs/setuptools_scm-3.0.6-py3.7.egg/setuptools_scm/__init__.py", line 44, in _version_from_entrypoint
      for ep in iter_matching_entrypoints(config.absolute_root, entrypoint):
      AttributeError: 'str' object has no attribute 'absolute_root'
      
      ----------------------------------------
      Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/6r/dy0_bd2x2kn735d8kymc4qt00000gn/T/pip-install-w77cbide/pyarrow/
      
      

       

      I suspect this is because setuptools_scm isn't being used correctly. The function takes one argument, root, but judging from the code that uses it, it appears to expect a setuptools_scm.config.Configuration object rather than a file path.

      All the documentation says to use get_version() and the package author doesn't seem to be sure that version_from_scm() should even be a public function (see here). Perhaps going with that would be best.

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              yiannisliodakis Diego Argueta
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h