Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import dependencies_in_sync from hatchling #28

Merged

Conversation

jayqi
Copy link
Contributor

@jayqi jayqi commented Feb 9, 2024

Imports dependencies_in_sync from hatchling to check whether dependencies are synced, instead of using the hatching CLI via a shell command. This means that hatching just needs to be installed in the same environment as hatch/hatch-conda, but doesn't need it's CLI entrypoint to be available on the user's PATH.

This implementation is based on how hatch implements VirtualEnvironment.dependencies_in_sync.

https://github.com/pypa/hatch/blob/cfa05386f9dc4a029462a23a38d0885176efbaac/src/hatch/env/virtual.py#L128-L137

Closes #27.

Tested with pipx in a project using hatch-conda in the default environment:

pipx install hatch
pipx inject hatch git+https://github.com/jayqi/hatch-conda.git@27-fix-filenotfounderror-hatchling
hatch env create

@OldGrumpyViking OldGrumpyViking merged commit 1fe58f1 into OldGrumpyViking:main May 14, 2024
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.

FileNotFoundError: No such file or directory: 'hatchling'
2 participants