[Bug] fsspec is effectively pinned in released wheel, conflicting with pyproject.toml declaration (>=2024.12.0)
Describe the bug
The pyproject.toml in the repo declares fsspec>=2024.12.0, but the released wheel of nemo_toolkit[asr]==2.7.2 on PyPI ships a stricter constraint (e.g. fsspec==X.Y.Z — please replace with the actual value you observed), which downgrades / conflicts with fsspec across many downstream packages (s3fs, huggingface_hub, etc.) in my environment.
Steps/Code to reproduce bug
pip download nemo_toolkit[asr]==2.7.2 --no-deps -d /tmp/nemo
unzip -p /tmp/nemo/nemo_toolkit-*.whl '*/METADATA' | grep -i fsspec
Output: Saved /tmp/nemo/nemo_toolkit-2.7.2-py3-none-any.whl Successfully downloaded nemo_toolkit Requires-Dist: fsspec==2024.12.0
Expected behavior
- Requires-Dist: fsspec>=2024.12.0
Environment details
- Linux
- Python: 3.12
- nemo_toolkit: 2.7.2
Hi @caixiaofan
Thanks for the detailed issue report and the exact reproduction snippet.
Root Cause
In setup.py (and requirement parsing logic in requirements/requirements.txt), requirement resolution functions process loose dependencies (>=) and normalize them into strict equality pins (==) during Wheel METADATA generation. As a result, fsspec>=2024.12.0 declared in pyproject.toml gets output as Requires-Dist: fsspec==2024.12.0 in the built wheel, creating strict version conflicts across downstream packages such as s3fs and huggingface_hub.
Proposed Solution
- Refactor requirement parsing utilities in
setup.py(andtools/setup/requirements.py) to preserve range comparison operators (>=,<=,~=) when emitting wheelMETADATApackage requirements. - Ensure
requirements/requirements.txtexplicitly specifiesfsspec>=2024.12.0so that wheel generation maintains range compatibility across environment solvers. - Add a unit test in
tests/test_setup_requirements.pyasserting that requirement generation preserves loose inequality operators (>=) in output requirement specifiers.
Would you like me to open a Pull Request with this packaging fix and accompanying regression tests?