Replies: 1 comment 6 replies
-
You need a custom build hook in order to use the [project]
name = "tagstr"
readme = "README.md"
dynamic = ["version"]
requires-python = ">=3.8"
description = "Tagged template literals for Python"
[tool.hatch.version]
path = "src/tagstr/__init__.py"
[tool.hatch.build.targets.wheel.hooks.custom]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
from hatchling.builders.hooks.plugin.interface import BuildHookInterface
class CustomBuildHook(BuildHookInterface):
def initialize(self, version, build_data):
if version == 'editable':
build_data['force_include_editable'] = {'src/tagstr.pth': 'tagstr.pth'} |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now, I have a package which installs a in import hook. That is, it includes a
.pth
file. The normal install works great viapip install .
. However, the editable install viapip install -e .
or the version installed byhatch shell
is broken. When the import hook is triggered it complains that it cannot find my package. I suspect this is a bug or a limitation. Any help is appreciated.Useful Links:
pyproject.toml
src/
directory.pth
fileBeta Was this translation helpful? Give feedback.
All reactions