GH-40163: [Archery] Avoid setuptools_scm internal API - #50669
Conversation
|
|
| version_file = tmp_path / "version.txt" | ||
| version_file.write_text("released\n") | ||
| run_git("add", "version.txt") |
There was a problem hiding this comment.
What is the version file for? It shouldn't be used for version parsing AFAICT.
There was a problem hiding this comment.
Removed version.txt; the integration test now uses two --allow-empty commits only to establish the tagged commit and distance.
|
|
||
| import os | ||
| import re | ||
| import subprocess |
There was a problem hiding this comment.
Nit: please let's keep these imports (roughly) alphabetically-ordered :-)
There was a problem hiding this comment.
Reordered the standard-library imports.
|
|
||
|
|
||
| def test_get_version_from_git_repository(tmp_path): | ||
| def run_git(*args): |
There was a problem hiding this comment.
This test will fail if a git command is not available (which is unlikely on dev setups, for sure). Can we skip in that case?
There was a problem hiding this comment.
Added a pytest.mark.skipif guard using shutil.which("git").
pitrou
left a comment
There was a problem hiding this comment.
Thanks for the update @LarryHu0217
|
Could you double-check this @raulcd ? |
|
@github-actions crossbow submit wheelcp314t* |
|
Revision: 2140393 Submitted crossbow builds: ursacomputing/crossbow @ actions-13a619705c |
raulcd
left a comment
There was a problem hiding this comment.
This LGTM, thanks for the PR @LarryHu0217
|
The names of generated wheel files above seem as expected. |
Rationale for this change
Crossbow currently computes development versions through internal
setuptools_scmAPIs. Those APIs are unstable and require Archery to pin an otherwise unnecessary runtime dependency.What changes are included in this PR?
git describeoutput.setuptools_scmfrom the Crossbow extra.Are these changes tested?
python -m pytest -q dev/archery/archery/crossbow/tests/test_core.py(31 passed)flake8 --max-line-length=88on the changed Python filesautopep8 --diff --max-line-length=88on the changed Python filessetuptools_scmis not installedAre there any user-facing changes?
No. This removes an internal dependency while preserving Crossbow version behavior.
Closes #40163