Repository navigation
[py-pandas] Set the version when building from the GitHub archive - #303
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The port builds pandas from the GitHub tag archive, which has no git metadata, so versioneer reports the version as
0+unknown. On every tripletpandas.__version__is0+unknown, and packages that check it misbehave:Table.to_pandas()andTable.from_pandas()raiseImportError: pyarrow requires pandas 2.2.2 or above, pandas 0+unknown is installed.PANDAS_GE_23,PANDAS_GE_30andPANDAS_GE_31to false, so it takes its code paths for older pandas on pandas 3.pandas' meson build uses an existing
_version_meson.pyat the source root as is; the sdist ships one. The port now writes it withVERSION.__git_version__stays empty because the archive doesn't record the commit; pandas only shows it inpd.show_versions().Tested on an arm64 Mac, cross-building
x64-osx-dynamic-releasewith the #299/#300/#302 stack:pandas.__version__is3.1.0, a DataFrame round trip through pyarrow works, and geopandas writes and reads GeoParquet.Not tested: a native build. CI builds py-pandas on macOS.