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

How can a BuildHookInterface class determine whether it's being run for an editable build? #1626

Closed
jwodder opened this issue Jul 18, 2024 · 4 comments

Comments

@jwodder
Copy link
Contributor

jwodder commented Jul 18, 2024

I am the author of a package that provides a custom Hatch build hook for modifying source trees, and I need the hook to not run when a package is installed in editable mode, yet I cannot see how a build hook can determine whether this is the case.

Possibly related issue: #1348

@ofek
Copy link
Collaborator

ofek commented Jul 18, 2024

#1511 (comment)

@ofek
Copy link
Collaborator

ofek commented Jul 18, 2024

@jwodder
Copy link
Contributor Author

jwodder commented Jul 18, 2024

@ofek So, to be clear, for an editable install, the version argument passed to BuildHookInterface.initialize() will be "editable", correct?

@ofek
Copy link
Collaborator

ofek commented Jul 18, 2024

if the target_name is wheel yes: https://hatch.pypa.io/latest/plugins/builder/wheel/#versions

@jwodder jwodder closed this as completed Jul 18, 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

No branches or pull requests

2 participants