Describe the bug
Installing from source on debian 11 and python 3.9 will fail as below:
sh install.sh
apt-get is /usr/bin/apt-get
Installing on Debian.
Trovato:1 http://deb.debian.org/debian bullseye InRelease
Trovato:2 http://security.debian.org/debian-security bullseye-security InRelease
Trovato:3 http://deb.debian.org/debian bullseye-updates InRelease
Trovato:4 http://deb.debian.org/debian bullseye-backports InRelease
Lettura elenco dei pacchetti... Fatto
Lettura elenco dei pacchetti... Fatto
Generazione albero delle dipendenze... Fatto
Lettura informazioni sullo stato... Fatto
python3-venv è già alla versione più recente (3.9.2-3).
0 aggiornati, 0 installati, 0 da rimuovere e 13 non aggiornati.
Python version is 3.9
Requirement already satisfied: pip in ./venv/lib/python3.9/site-packages (21.3.1)
Requirement already satisfied: wheel in ./venv/lib/python3.9/site-packages (0.37.1)
Looking in indexes: https://pypi.org/simple, https://pypi.chia.net/simple/
Requirement already satisfied: miniupnpc==2.2.2 in ./venv/lib/python3.9/site-packages (2.2.2)
Looking in indexes: https://pypi.org/simple, https://pypi.chia.net/simple/
Obtaining file:///usr/src/stor-blockchain
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /usr/src/stor-blockchain/venv/bin/python /usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7isicz8u
cwd: /usr/src/stor-blockchain
Complete output (34 lines):
Traceback (most recent call last):
File "/usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 164, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 174, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 158, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 125, in <module>
setup(**kwargs) # type: ignore
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 109, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 459, in __init__
_Distribution.__init__(
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
self.finalize_options()
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 837, in finalize_options
ep(self)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools_scm/integration.py", line 94, in infer_version
dist.metadata.version = _get_version(config)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 177, in _get_version
parsed_version = _do_parse(config)
File "/tmp/pip-build-env-aomrxeuo/overlay/lib/python3.9/site-packages/setuptools_scm/__init__.py", line 135, in _do_parse
raise LookupError(
LookupError: setuptools-scm was unable to detect version for '/usr/src/stor-blockchain'.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
----------------------------------------
WARNING: Discarding file:///usr/src/stor-blockchain. Command errored out with exit status 1: /usr/src/stor-blockchain/venv/bin/python /usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7isicz8u Check the logs for full command output.
ERROR: Command errored out with exit status 1: /usr/src/stor-blockchain/venv/bin/python /usr/src/stor-blockchain/venv/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp7isicz8u Check the logs for full command output.
bug