Open hcording opened 1 month ago
I think the way to do that, would be to create a virtualenv where you install both zest.releaser
and hatchling
.
I tried your example. I need to add README.md
and src/test/__init__.py
, otherwise a plain python -m build .
does not work.
Indeed then the prerelease
part works, which also uses build
and hatchling
as called by pyroma
, but the release
part not. And you get basically the same error as if you would have done this:
$ bin/python -m build --no-isolation .
* Getting build dependencies for sdist...
Traceback (most recent call last):
File "/Users/maurits/community/zest.releaser/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
File "/Users/maurits/community/zest.releaser/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
obj = import_module(mod_path)
^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/maurits/.pyenv/versions/3.11.7/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'hatchling'
ERROR Backend 'hatchling.build' is not available.
So release
is probably calling build
in non-isolated mode. We are doing it here and here.
pyroma
seems to import build
and call it.
@hcording Can you try https://github.com/zestsoftware/zest.releaser/pull/449 ?
Hi, are there currently plans to support
hatch
as build backend? Since pyproject.toml is supported (#415), I think it would be an important feature to have. I have the following minimal code base:pyproject.toml
version.txt
Running
fullrelease
, I get this output:So it seems that
hatchling.build
is somehow not supported. Note thatpython -m build
works, sincepyroma
succeeded beforehand.Any help is appreciated!