Skip to content

Refactor requirements handling in setup.py - #22

Merged
sw005320 merged 3 commits into
chimechallenge:mainfrom
alexanderwerning:alexanderwerning-patch-1
Aug 10, 2026
Merged

Refactor requirements handling in setup.py#22
sw005320 merged 3 commits into
chimechallenge:mainfrom
alexanderwerning:alexanderwerning-patch-1

Conversation

@alexanderwerning

Copy link
Copy Markdown
Contributor

Refactored requirements handling by adding a read_requirements function to read from requirements.txt and removed pkg_resources dependency.

setuptools 82 removed pkg_resources, importlib is recommended to access files in the package. The install is currently failing, this fixes it.

This caused issues in packages downstream: fgnt/meeteval#131

Refactored requirements handling by adding a read_requirements function to read from requirements.txt and removed pkg_resources dependency.
@sw005320

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates setup.py to stop using pkg_resources (removed in newer setuptools) and instead read dependencies directly from requirements.txt, restoring install/build compatibility.

Changes:

  • Added read_requirements() to load requirements from requirements.txt via pathlib.Path.
  • Removed the pkg_resources.parse_requirements(...) dependency parsing logic.
  • Updated install_requires construction to concatenate the dynamically built list with read_requirements() output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread setup.py
Comment on lines 8 to 11
try:
import torch # noqa: F401
except ImportError:
requirements.append("torch")
Comment thread setup.py Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@sw005320

Copy link
Copy Markdown
Contributor

Thanks for your PR. Can you fix this? https://github.com/chimechallenge/chime-utils/actions/runs/31384766975/job/93443236152?pr=22#step:7:87

This is handled by copilot.
See #22 (comment)

@sw005320

Copy link
Copy Markdown
Contributor

@sw005320
sw005320 merged commit 1528824 into chimechallenge:main Aug 10, 2026
5 checks passed
@sw005320

Copy link
Copy Markdown
Contributor

Thanks, @alexanderwerning!

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.

3 participants