Skip to content

Commit fe4caca

Browse files
committed
Didn't work
1 parent 0613daa commit fe4caca

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

.github/workflows/package-checks.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ jobs:
3838
with:
3939
python-version: '3.8'
4040

41-
# # Can take a significant amount of time while this should only check that
42-
# # the extras are installed
43-
# - name: Disable building ext_modules
44-
# run: |
45-
# sed -i '/ext_modules=/d' setup.py
46-
# shell: bash -el {0}
41+
# Hacky patch to disable building cython extensions.
42+
# This job should only check that the extras successfully install.
43+
- name: Disable building ext_modules
44+
run: |
45+
sed -i '/ext_modules=/d' setup.py
46+
shell: bash -el {0}
4747

4848
- name: Install required dependencies
4949
run: |
@@ -52,5 +52,5 @@ jobs:
5252

5353
- name: Pip install with extra
5454
run: |
55-
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation --install-option="no-extensions"
55+
python -m pip install -e .[${{ matrix.extra }}] --no-build-isolation
5656
shell: bash -el {0}

scripts/validate_min_versions_in_sync.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
)
2525
CODE_PATH = pathlib.Path("pandas/compat/_optional.py").resolve()
2626
SETUP_PATH = pathlib.Path("setup.cfg").resolve()
27-
EXCLUDE_DEPS = {"tzdata"}
27+
EXCLUDE_DEPS = {"tzdata", "blosc"}
2828
# pandas package is not available
2929
# in pre-commit environment
3030
sys.path.append("pandas/compat")
@@ -38,10 +38,11 @@
3838

3939

4040
def get_versions_from_code() -> dict[str, str]:
41+
"""Min versions for checking within pandas code."""
4142
install_map = _optional.INSTALL_MAPPING
4243
versions = _optional.VERSIONS
4344
for item in EXCLUDE_DEPS:
44-
versions.pop(item)
45+
versions.pop(item, None)
4546
return {
4647
install_map.get(k, k).casefold(): v
4748
for k, v in versions.items()
@@ -50,6 +51,7 @@ def get_versions_from_code() -> dict[str, str]:
5051

5152

5253
def get_versions_from_ci(content: list[str]) -> tuple[dict[str, str], dict[str, str]]:
54+
"""Min versions in CI job for testing all optional dependencies."""
5355
# Don't parse with pyyaml because it ignores comments we're looking for
5456
seen_required = False
5557
seen_optional = False
@@ -79,6 +81,7 @@ def get_versions_from_ci(content: list[str]) -> tuple[dict[str, str], dict[str,
7981

8082

8183
def get_versions_from_setup() -> dict[str, str]:
84+
"""Min versions in setup.cfg for pip install pandas[extra]."""
8285
install_map = _optional.INSTALL_MAPPING
8386
optional_dependencies = {}
8487

@@ -99,7 +102,7 @@ def get_versions_from_setup() -> dict[str, str]:
99102
optional_dependencies[install_map.get(package, package).casefold()] = version
100103

101104
for item in EXCLUDE_DEPS:
102-
optional_dependencies.pop(item)
105+
optional_dependencies.pop(item, None)
103106

104107
return optional_dependencies
105108

setup.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,6 @@ def maybe_cythonize(extensions, *args, **kwargs):
407407
# See https://github.com/cython/cython/issues/1495
408408
return extensions
409409

410-
elif "no-extensions" in sys.argv:
411-
# For pip install extras CI job in .github/workflows/package-checks.yml
412-
return []
413-
414410
elif not _CYTHON_INSTALLED:
415411
# GH#28836 raise a helfpul error message
416412
if _CYTHON_VERSION:

0 commit comments

Comments
 (0)