This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 2d4c80b354 GH-43114: [Archery][Dev] Support setuptools-scm >= 8.0.0
(#43156)
2d4c80b354 is described below
commit 2d4c80b3544b4d8bc8633058d130bafe5c93ba2a
Author: Hyunseok Seo <[email protected]>
AuthorDate: Sat Jul 13 05:33:21 2024 +0900
GH-43114: [Archery][Dev] Support setuptools-scm >= 8.0.0 (#43156)
### Rationale for this change
The update to `setuptools-scm` version 8.0.0 or higher ensures
compatibility for Archery.
### What changes are included in this PR?
- Added `Configuration` objects to handle necessary parameters
(`get_describe_command`)
- Fixed the `parse_git_version` function to align with the new version of
`setuptools_scm`
- Updated `setuptools_scm` requirement to version 8.0.0 or higher
### Are these changes tested?
Yes, tested by CI.
### Are there any user-facing changes?
No.
* GitHub Issue: #43114
Authored-by: Hyunseok Seo <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
dev/archery/archery/crossbow/core.py | 9 ++++++++-
dev/archery/setup.py | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dev/archery/archery/crossbow/core.py
b/dev/archery/archery/crossbow/core.py
index 0b5d242bba..4e6b42e485 100644
--- a/dev/archery/archery/crossbow/core.py
+++ b/dev/archery/archery/crossbow/core.py
@@ -746,12 +746,19 @@ def get_version(root, **kwargs):
subprojects, e.g. apache-arrow-js-XXX tags.
"""
from setuptools_scm.git import parse as parse_git_version
+ from setuptools_scm import Configuration
# query the calculated version based on the git tags
kwargs['describe_command'] = (
'git describe --dirty --tags --long --match "apache-arrow-[0-9]*.*"'
)
- version = parse_git_version(root, **kwargs)
+
+ # Create a Configuration object with necessary parameters
+ config = Configuration(
+ git_describe_command=kwargs['describe_command']
+ )
+
+ version = parse_git_version(root, config=config, **kwargs)
tag = str(version.tag)
# We may get a development tag for the next version, such as "5.0.0.dev0",
diff --git a/dev/archery/setup.py b/dev/archery/setup.py
index cd3e2e9ca0..f87316dcc7 100755
--- a/dev/archery/setup.py
+++ b/dev/archery/setup.py
@@ -34,7 +34,7 @@ jinja_req = 'jinja2>=2.11'
extras = {
'benchmark': ['pandas'],
'crossbow': ['github3.py', jinja_req, 'pygit2>=1.14.0', 'requests',
- 'ruamel.yaml', 'setuptools_scm<8.0.0'],
+ 'ruamel.yaml', 'setuptools_scm>=8.0.0'],
'crossbow-upload': ['github3.py', jinja_req, 'ruamel.yaml',
'setuptools_scm'],
'docker': ['ruamel.yaml', 'python-dotenv'],