Skip to content

Commit 7d11935

Browse files
committed
CI: Versioneer not picking up version in 32-bit build
1 parent 578e918 commit 7d11935

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

.github/workflows/32-bit-linux.yml

+6
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,15 @@ jobs:
2323

2424
- name: Run 32-bit manylinux2014 Docker Build / Tests
2525
run: |
26+
# Without this (line 34), versioneer will not be able to determine the pandas version.
27+
# This is because of a security update to git that blocks it from reading the config folder if
28+
# it is not owned by the current user. We hit this since the "mounted" folder is not hit by the
29+
# Docker container.
30+
# xref https://github.com/pypa/manylinux/issues/1309
2631
docker pull quay.io/pypa/manylinux2014_i686
2732
docker run --platform linux/386 -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
2833
/bin/bash -xc "cd pandas && \
34+
git config --global --add safe.directory /pandas && \
2935
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
3036
. ~/virtualenvs/pandas-dev/bin/activate && \
3137
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \

pandas/tests/test_common.py

-8
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
import numpy as np
66
import pytest
77

8-
from pandas.compat import (
9-
IS64,
10-
is_ci_environment,
11-
)
12-
138
import pandas as pd
149
from pandas import Series
1510
import pandas._testing as tm
@@ -162,9 +157,6 @@ def test_standardize_mapping():
162157
assert isinstance(com.standardize_mapping(dd), partial)
163158

164159

165-
@pytest.mark.xfail(
166-
is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job"
167-
)
168160
def test_git_version():
169161
# GH 21295
170162
git_version = pd.__git_version__

pandas/tests/util/test_show_versions.py

-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@
44

55
import pytest
66

7-
from pandas.compat import (
8-
IS64,
9-
is_ci_environment,
10-
)
117
from pandas.util._print_versions import (
128
_get_dependency_info,
139
_get_sys_info,
@@ -73,9 +69,6 @@ def test_show_versions_console_json(capsys):
7369
assert result == expected
7470

7571

76-
@pytest.mark.xfail(
77-
is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job"
78-
)
7972
def test_show_versions_console(capsys):
8073
# gh-32041
8174
# gh-32041

versioneer.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
649649
GITS = ["git.cmd", "git.exe"]
650650
651651
out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root,
652-
hide_stderr=True)
652+
hide_stderr=False)
653653
if rc != 0:
654654
if verbose:
655655
print("Directory %%s not under git control" %% root)
@@ -1054,7 +1054,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
10541054
if sys.platform == "win32":
10551055
GITS = ["git.cmd", "git.exe"]
10561056

1057-
out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=True)
1057+
out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root, hide_stderr=False)
10581058
if rc != 0:
10591059
if verbose:
10601060
print("Directory %s not under git control" % root)

0 commit comments

Comments
 (0)