Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/build-pandas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ jobs:
CIBW_MANYLINUX_RISCV64_IMAGE: ${{ env.MANYLINUX_RISCV64_IMAGE }}
# CIBW_ENVIRONMENT replaces pandas's [tool.cibuildwheel] environment
# table wholesale, so its own LDFLAGS has to be restated here.
# pandas 3.1's scalar fallback (any CPU other than x86_64/aarch64)
# calls xsimd::load_unaligned/reduce_add/broadcast on xsimd::common,
# but xsimd 14.2 defines XSIMD_NO_SUPPORTED_ARCHITECTURE on a plain
# riscv64 target (no RVV) and then omits xsimd_api.hpp; the emulated
# arch makes xsimd keep the API.
CIBW_ENVIRONMENT: >-
LDFLAGS=-Wl,--strip-all
CXXFLAGS=-DXSIMD_WITH_EMULATED=1
PIP_EXTRA_INDEX_URL=https://pypi.riseproject.dev/simple/
PIP_ONLY_BINARY=numpy,hypothesis
# cibuildwheel copies the source into a fresh container per build, and
Expand All @@ -98,11 +104,14 @@ jobs:
# git describe reads when the meson build resolves the version (gotcha
# 315). CIBW_BEFORE_BUILD replaces pandas's [tool.cibuildwheel]
# before-build wholesale, so re-run it here, then commit and re-tag in
# the same container before the build reads the version.
# the same container before the build reads the version. pandas 3.1
# dropped the script, so skip it when absent.
CIBW_BEFORE_BUILD: >-
if [ -f {package}/scripts/cibw_before_build.sh ]; then
PACKAGE_DIR={package} bash {package}/scripts/cibw_before_build.sh &&
git -C {package} -c user.name=ci -c user.email=ci@localhost commit -am "cibw before-build" &&
git -C {package} tag -f v${{ env.PANDAS_VERSION }}
git -C {package} tag -f v${{ env.PANDAS_VERSION }};
fi

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
Expand Down
1 change: 1 addition & 0 deletions docs/packages/pandas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,4 @@ versions:
- filename: pandas-3.0.6-cp314-cp314-manylinux_2_38_riscv64.manylinux_2_39_riscv64.whl
sha256: 4bc771048b8e7ac4191168e180177e373be9adc5911fc3a4277e22eb25bced61
requires-python: '>=3.11'
- version: 3.1.0
48 changes: 48 additions & 0 deletions patches/pandas/3.1.0/0001-disable-nan-test-on-riscv64.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
From 5e254d628784dd803ff9b492b06db8118b4bbaee Mon Sep 17 00:00:00 2001
From: Julien Stephan <jstephan@baylibre.com>
Date: Thu, 26 Mar 2026 13:41:01 +0100
Subject: [PATCH] disable nan test on riscv64

Upstream-Status: To upstream [To send when we will add riscv64 support upstream]
Signed-off-by: Julien Stephan <jstephan@baylibre.com>
---
pandas/tests/tools/test_to_datetime.py | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/pandas/tests/tools/test_to_datetime.py b/pandas/tests/tools/test_to_datetime.py
index c61137d..2db1b74 100644
--- a/pandas/tests/tools/test_to_datetime.py
+++ b/pandas/tests/tools/test_to_datetime.py
@@ -11,6 +11,7 @@ from datetime import (
)
from decimal import Decimal
import locale
+import platform
import re
import zoneinfo

@@ -1864,6 +1865,10 @@ class TestToDatetimeUnit:
tm.assert_index_equal(result, expected)

# with a nan!
+ # skip test on riscv64
+ if platform.machine() == 'riscv64':
+ return
+
result = pd.to_datetime(np.array([item, np.nan]), unit=unit, cache=cache)
assert result.isna()[1]
tm.assert_index_equal(result[:1], expected)
@@ -4743,6 +4748,10 @@ def test_to_datetime_lxml_elementunicoderesult_with_format(cache):


def test_to_datetime_missing_component_no_runtime_warning():
+ # skip test on riscv64
+ if platform.machine() == 'riscv64':
+ return
+
df = pd.DataFrame(
{
"year": [2023, 2023],
--
2.54.0

Loading