build icon indicating copy to clipboard operation
build copied to clipboard

ERROR: Backend 'setuptools.build.meta' is not available

Open charlesdwright opened this issue 2 years ago • 5 comments

Windows 10 (venv) build 0.8.0 colorama 0.4.5 packaging 21.3 pep517 0.12.0 pyparsing 3.0.9 setuptools 62.4.0 tomli 2.0.1

is there any other way to build a python package without having to use this?

charlesdwright avatar Jun 16 '22 22:06 charlesdwright

The setuptools backend is found at setuptools.build_meta, not setuptools.build.meta

layday avatar Jun 16 '22 22:06 layday

I love you. Platonically, of course.

Now if they could just get the echo to work when expecting credentials...

charlesdwright avatar Jun 16 '22 22:06 charlesdwright

I wonder if it would make sense to have a list of common backend strings and check for typos like we do for the table keys.

FFY00 avatar Jun 17 '22 07:06 FFY00

Maybe, but I think most people copy the backend config section from documentation.

layday avatar Jun 17 '22 12:06 layday

Likely so. I like to type things in when learning something new to me.

charlesdwright avatar Jun 17 '22 12:06 charlesdwright

I am facing this now. i write down build-backend = "setuptools.build_meta" at pyproject.toml, but error says:

Traceback (most recent call last):
  File "/home/testman/workspace/python3/setup-test/venv/lib/python3.10/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 "/home/testman/workspace/python3/setup-test/venv/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'

i have already installed setuptools

# pip install setuptools
Requirement already satisfied: setuptools in ./venv/lib/python3.10/site-packages (68.2.2)

Does anyone has some idea?

Jangab-water avatar Oct 31 '23 02:10 Jangab-water

You also need requires:

[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]

Otherwise you might not get setuptools in the isolated build environment.

henryiii avatar Oct 31 '23 02:10 henryiii

@henryiii It works for me. Thank you for your help :D

Jangab-water avatar Nov 01 '23 05:11 Jangab-water