Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI][Dev][Python] Release and merge script errors #37803

Closed
pitrou opened this issue Sep 20, 2023 · 8 comments · Fixed by #37819 or #37930
Closed

[CI][Dev][Python] Release and merge script errors #37803

pitrou opened this issue Sep 20, 2023 · 8 comments · Fixed by #37819 or #37930

Comments

@pitrou
Copy link
Member

pitrou commented Sep 20, 2023

Describe the bug, including details regarding any error messages, version, and platform.

The "Source Release and Merge Script" jobs have been starting to fail with Python-related errors.

See for example logs at https://github.com/apache/arrow/actions/runs/6250225828/job/16968598166#step:7:50

  /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py:31: RuntimeWarning: 
  ERROR: setuptools==56.0.0 is used in combination with setuptools_scm>=8.x
  
  Your build configuration is incomplete and previously worked by accident!
  setuptools_scm requires setuptools>=61
  
  Suggested workaround if applicable:
   - migrating from the deprecated setup_requires mechanism to pep517/518
     and using a pyproject.toml to declare build dependencies
     which are reliably pre-installed before running the build tools
  
    warnings.warn(
  ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject
      section = defn.get("tool", {})[tool_name]
  KeyError: 'setuptools_scm'
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
      config = _config.Configuration.from_file(dist_name=dist_name)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_config.py", line 128, in from_file
      pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject
      raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e
  LookupError: pyproject.toml does not contain a tool.setuptools_scm section
  Traceback (most recent call last):
    File "setup.py", line 475, in <module>
      setup(
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 434, in __init__
      _Distribution.__init__(self, {
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/distutils/dist.py", line 292, in __init__
      self.finalize_options()
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 743, in finalize_options
      ep(self)
    File "/Users/runner/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/setuptools/dist.py", line 750, in _finalize_setup_keywords
      ep.load()(self, ep.name, value)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
      _assign_version(dist, config)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
      maybe_version = _get_version(config, force_write_version_files=True)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_get_version_impl.py", line 94, in _get_version
      write_version_files(config, version=version_string, scm_version=parsed_version)
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
      dump_version(
    File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/.eggs/setuptools_scm-8.0.1-py3.8.egg/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
      assert not write_to.is_absolute(), f"{write_to=}"
  AssertionError: write_to=PosixPath('/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/d20230920-1658-v4ivhq/apache-arrow-14.0.0/python/pyarrow/_generated_version.py')

Component(s)

Continuous Integration, Developer Tools, Python

@pitrou
Copy link
Member Author

pitrou commented Sep 20, 2023

@CZWin32768
Copy link

I have the same issue for 13.0 with python==3.11 in a venv environment.

@colin-rogers-dbt
Copy link

I'm seeing this when attempting to build from source as well via pip on py38:

error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [38 lines of output]
      <string>:36: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "/home/runner/.local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/runner/.local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/home/runner/.local/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 630, in <module>
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 303, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 680, in finalize_options
          ep(self)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
          _assign_version(dist, config)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
          maybe_version = _get_version(config, force_write_version_files=True)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools_scm/_get_version_impl.py", line 94, in _get_version
          write_version_files(config, version=version_string, scm_version=parsed_version)
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
          dump_version(
        File "/tmp/pip-build-env-x8k25mom/overlay/lib/python3.8/site-packages/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
          assert not write_to.is_absolute(), f"{write_to=}"
      AssertionError: write_to=PosixPath('/tmp/pip-download-2jknfbz1/pyarrow_b07f740b726647018b58ccd586f32386/pyarrow/_generated_version.py')
      [end of output]

@colin-rogers-dbt
Copy link

running: pip install pyarrow --no-binary :all: --force-reinstall --no-cache
on: macOS 13.4.1 (c) / py3.11
yields:

Collecting pyarrow
  Downloading pyarrow-13.0.0.tar.gz (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 17.5 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      <string>:34: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      Traceback (most recent call last):
        File "/Users/colinrogers/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/Users/colinrogers/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/colinrogers/.asdf/installs/python/3.11.0/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
          return hook(metadata_directory, config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 475, in <module>
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
                                       ^^^^^^^^^^^^
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 303, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 680, in finalize_options
          ep(self)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
          _assign_version(dist, config)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/setuptools.py", line 54, in _assign_version
          maybe_version = _get_version(config, force_write_version_files=True)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools_scm/_get_version_impl.py", line 94, in _get_version
          write_version_files(config, version=version_string, scm_version=parsed_version)
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
          dump_version(
        File "/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-build-env-7ohys3uk/overlay/lib/python3.11/site-packages/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
          assert not write_to.is_absolute(), f"{write_to=}"
      AssertionError: write_to=PosixPath('/private/var/folders/5_/1cykfnvj641gf4rsdwj6v8p00000gp/T/pip-install-gpb9c1m6/pyarrow_9cdbd6e2381142d08bbb3fe4948a984d/pyarrow/_generated_version.py')

@brunoartc
Copy link

brunoartc commented Sep 21, 2023

Got the same error building on Jenkins with image
NAME="Amazon Linux" VERSION="2" ID="amzn" ID_LIKE="centos rhel fedora" VERSION_ID="2" PRETTY_NAME="Amazon Linux 2" ANSI_COLOR="0;33" CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2" HOME_URL="https://amazonlinux.com/" VARIANT_ID="202309131028-2.0.1122.0"
building C++ works well
building python wheel breaks with
AssertionError: write_to=PosixPath('/pyarrow-build/arrow/python/pyarrow/_generated_version.py')
tried to replace all paths with a relative path without success
solved the issue referencing setuptools_scm==7.1.0,since 8.0.0 deprecated write_to

@gablooge
Copy link

Still got the similar issue in ubuntu runner image with any previous setuptools_scm versions

Collecting pyarrow==12.0.0
  Downloading pyarrow-12.0.0.tar.gz (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 16.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      <string>:34: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
      Traceback (most recent call last):
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject
          section = defn.get("tool", {})[tool_name]
      KeyError: 'setuptools_scm'
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
          config = _config.Configuration.from_file(dist_name=dist_name)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_config.py", line 128, in from_file
          pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject
          raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e
      LookupError: pyproject.toml does not contain a tool.setuptools_scm section
      Traceback (most recent call last):
        File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])

        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 474, in <module>
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 303, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 680, in finalize_options
          ep(self)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
          _assign_version(dist, config)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line [54]
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 94, in _get_version
          write_version_files(config, version=version_string, scm_version=parsed_version)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
          dump_version(
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
          assert not write_to.is_absolute(), f"{write_to=}"
      AssertionError: write_to=PosixPath('/tmp/pip-install-sjvcm0ie/pyarrow_12854cb8e10342[55]
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.

@brunoartc
Copy link

Still got the similar issue in ubuntu runner image with any previous setuptools_scm versions

Collecting pyarrow==12.0.0
  Downloading pyarrow-12.0.0.tar.gz (1.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.0/1.0 MB 16.9 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [54 lines of output]
      <string>:34: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
      ERROR setuptools_scm._integration.setuptools pyproject.toml does not contain a tool.setuptools_scm section
      Traceback (most recent call last):
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 53, in read_pyproject
          section = defn.get("tool", {})[tool_name]
      KeyError: 'setuptools_scm'
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 121, in infer_version
          config = _config.Configuration.from_file(dist_name=dist_name)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_config.py", line 128, in from_file
          pyproject_data = _read_pyproject(name, _load_toml=_load_toml)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/pyproject_reading.py", line 55, in read_pyproject
          raise LookupError(f"{name} does not contain a tool.{tool_name} section") from e
      LookupError: pyproject.toml does not contain a tool.setuptools_scm section
      Traceback (most recent call last):
        File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in <module>
          main()
        File "/usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])

        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 396, in prepare_metadata_for_build_wheel
          self.run_setup()
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 507, in run_setup
          super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in run_setup
          exec(code, locals())
        File "<string>", line 474, in <module>
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 103, in setup
          return distutils.core.setup(**attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 147, in setup
          _setup_distribution = dist = klass(attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 303, in __init__
          _Distribution.__init__(self, dist_attrs)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 283, in __init__
          self.finalize_options()
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 680, in finalize_options
          ep(self)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 700, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line 102, in version_keyword
          _assign_version(dist, config)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/setuptools.py", line [54]
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 94, in _get_version
          write_version_files(config, version=version_string, scm_version=parsed_version)
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_get_version_impl.py", line 63, in write_version_files
          dump_version(
        File "/tmp/pip-build-env-fxetnlzh/overlay/lib/python3.10/site-packages/setuptools_scm/_integration/dump_version.py", line 36, in dump_version
          assert not write_to.is_absolute(), f"{write_to=}"
      AssertionError: write_to=PosixPath('/tmp/pip-install-sjvcm0ie/pyarrow_12854cb8e10342[55]
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.

pip wheel needs to be updated to limit version to <8.0.0

Or you can compile by yourself

@AlenkaF
Copy link
Member

AlenkaF commented Sep 21, 2023

I have opened a PR with a quick fix where I have pinned the version of setuptools_scm . Thank you @brunoartc for sharing the info!

We should start to take steps towards changing the current build system though - as Joris already proposed here: #36411.

raulcd pushed a commit that referenced this issue Sep 21, 2023
### What changes are included in this PR?

Pin the version of `setuptools_scm` to `<8.0.0`.
* Closes: #37803

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
@raulcd raulcd added this to the 14.0.0 milestone Sep 21, 2023
jorisvandenbossche added a commit to jorisvandenbossche/arrow that referenced this issue Sep 28, 2023
etseidl pushed a commit to etseidl/arrow that referenced this issue Sep 28, 2023
…ache#37819)

### What changes are included in this PR?

Pin the version of `setuptools_scm` to `<8.0.0`.
* Closes: apache#37803

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
kou pushed a commit that referenced this issue Sep 28, 2023
… scripts (#37930)

Follow-up on #37819, which missed one place to add a pin for the release verification scripts
* Closes: #37803

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…ache#37819)

### What changes are included in this PR?

Pin the version of `setuptools_scm` to `<8.0.0`.
* Closes: apache#37803

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…cation scripts (apache#37930)

Follow-up on apache#37819, which missed one place to add a pin for the release verification scripts
* Closes: apache#37803

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
JerAguilon pushed a commit to JerAguilon/arrow that referenced this issue Oct 23, 2023
…cation scripts (apache#37930)

Follow-up on apache#37819, which missed one place to add a pin for the release verification scripts
* Closes: apache#37803

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…ache#37819)

### What changes are included in this PR?

Pin the version of `setuptools_scm` to `<8.0.0`.
* Closes: apache#37803

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…cation scripts (apache#37930)

Follow-up on apache#37819, which missed one place to add a pin for the release verification scripts
* Closes: apache#37803

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…ache#37819)

### What changes are included in this PR?

Pin the version of `setuptools_scm` to `<8.0.0`.
* Closes: apache#37803

Authored-by: AlenkaF <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
…cation scripts (apache#37930)

Follow-up on apache#37819, which missed one place to add a pin for the release verification scripts
* Closes: apache#37803

Authored-by: Joris Van den Bossche <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
h-vetinari added a commit to h-vetinari/arrow that referenced this issue Feb 20, 2024
raulcd pushed a commit that referenced this issue Feb 20, 2024
…rge script errors (#37819)" (#40150)

This reverts commit 79e49db.

#37931 should have been fixed as of pypa/setuptools-scm@056584b in setuptools_scm 8.0.4; I tested that this works in conda-forge/arrow-cpp-feedstock#1314.

CC @ AlenkaF @ raulcd 
* Closes: #37931

Authored-by: H. Vetinari <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this issue Feb 28, 2024
…lease and merge script errors (apache#37819)" (apache#40150)

This reverts commit 79e49db.

apache#37931 should have been fixed as of pypa/setuptools-scm@056584b in setuptools_scm 8.0.4; I tested that this works in conda-forge/arrow-cpp-feedstock#1314.

CC @ AlenkaF @ raulcd 
* Closes: apache#37931

Authored-by: H. Vetinari <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
thisisnic pushed a commit to thisisnic/arrow that referenced this issue Mar 8, 2024
…lease and merge script errors (apache#37819)" (apache#40150)

This reverts commit 79e49db.

apache#37931 should have been fixed as of pypa/setuptools-scm@056584b in setuptools_scm 8.0.4; I tested that this works in conda-forge/arrow-cpp-feedstock#1314.

CC @ AlenkaF @ raulcd 
* Closes: apache#37931

Authored-by: H. Vetinari <[email protected]>
Signed-off-by: Raúl Cumplido <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment