-
-
Notifications
You must be signed in to change notification settings - Fork 307
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
Question: Target editable install #227
Comments
My naive guess would be something like |
Hey thank you, I'd be happy to help with that! Relevant docs for a quick custom hook: https://hatch.pypa.io/latest/plugins/build-hook/#custom
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomHook(BuildHookInterface):
def initialize(self, version, build_data):
if self.target_name != 'wheel' or version != 'editable':
return
... |
If you do: [tool.hatch.build.targets.wheel.hooks.custom] rather than [tool.hatch.build.hooks.custom] then you don't need the |
Ideally we wouldn't have to write a What I'm hoping for is something similar to cibuildwheel's before build. We currently have used the following interface in [tool.jupyter-packaging.builder]
factory = "jupyter_packaging.npm_builder"
[tool.jupyter-packaging.build-args]
build_cmd = "build:src" |
Could you maintain something like For example, if you implement the [build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "new-jupyter-pkg"
[tool.hatch.build.targets.wheel.hooks.jupyter]
dependencies = ["hatch-jupyter-pkg-name"]
some-custom-option1 = "..."
some-custom-option2 = "..." |
I like that idea! We can have a |
I'll propose the solution this week to the relevant teams. |
How did it go? |
I didn't make the meetings this week, but I talked to a fellow maintainer and I'm going to take a spike with a hatch plugin and see if I can get something that works for |
( |
So far so good! ipython/ipykernel#931 |
Wow awesome! One critique: I think for consistency the TOML config options should be hyphenated e.g. |
Sounds good, thanks! |
Okay, the plugin is done and unit tested, I'll start trying it against some of our repos that use |
I'm glad it's working for you, thanks! Let me know how it goes and I'll add Jupyter to the known third party plugins and users in docs 😄 |
Hi @ofek, thanks for this library!
Based on your comment in
setuptools
about External Data, I am exploring usinghatch
as a wholesale replacement forjupyter_packaging
.One thing I am stuck on is how to run a specific build script during the editable wheel build phase.
I am happy to provide an example for the documentation if you give me the right spelling. 😄
The text was updated successfully, but these errors were encountered: