Skip to content

[py-pandas] Set the version when building from the GitHub archive - #303

Merged
3nids merged 2 commits into
mainfrom
py-pandas-version
Nov 6, 2026
Merged

3nids merged 2 commits into
mainfrom
py-pandas-version

Conversation

@3nids

@3nids 3nids commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

The port builds pandas from the GitHub tag archive, which has no git metadata, so versioneer reports the version as 0+unknown. On every triplet pandas.__version__ is 0+unknown, and packages that check it misbehave:

  • pyarrow turns off its pandas integration: Table.to_pandas() and Table.from_pandas() raise ImportError: pyarrow requires pandas 2.2.2 or above, pandas 0+unknown is installed.
  • geopandas sets PANDAS_GE_23, PANDAS_GE_30 and PANDAS_GE_31 to false, so it takes its code paths for older pandas on pandas 3.

pandas' meson build uses an existing _version_meson.py at the source root as is; the sdist ships one. The port now writes it with VERSION. __git_version__ stays empty because the archive doesn't record the commit; pandas only shows it in pd.show_versions().

Tested on an arm64 Mac, cross-building x64-osx-dynamic-release with the #299/#300/#302 stack: pandas.__version__ is 3.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.

@3nids
3nids enabled auto-merge (squash) November 6, 2026 05:41
@3nids
3nids merged commit 33bbcb7 into main Nov 6, 2026
5 checks passed
@3nids
3nids deleted the py-pandas-version branch November 6, 2026 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant