Module not found 'packaging' when calling build --sdist
Somehow the new way of calling python -m build --sdist added in 7aea12e9 does not work.
(base) D:\Daten\Code\python\enpt_enmapboxapp>python -m build --sdist
D:\Programme\mambaforge\python.exe: No module named build.__main__; 'build' is a package and cannot be directly executed
(base) D:\Daten\Code\python\enpt_enmapboxapp>conda activate enpt_test
(enpt_test) D:\Daten\Code\python\enpt_enmapboxapp>python -m build --sdist
D:\Programme\mambaforge\envs\enpt_test\python.exe: No module named build.__main__; 'build' is a package and cannot be directly executed
(enpt_test) D:\Daten\Code\python\enpt_enmapboxapp>pip install -U twine build
Requirement already satisfied: twine in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (4.0.2)
Collecting build
Downloading build-1.0.3-py3-none-any.whl.metadata (4.2 kB)
Requirement already satisfied: pkginfo>=1.8.1 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (1.9.6)
Requirement already satisfied: readme-renderer>=35.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (42.0)
Requirement already satisfied: requests>=2.20 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (2.31.0)
Requirement already satisfied: requests-toolbelt!=0.9.0,>=0.8.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (1.0.0)
Requirement already satisfied: urllib3>=1.26.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (2.1.0)
Requirement already satisfied: importlib-metadata>=3.6 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (6.8.0)
Requirement already satisfied: keyring>=15.1 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (24.3.0)
Requirement already satisfied: rfc3986>=1.4.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (2.0.0)
Requirement already satisfied: rich>=12.0.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from twine) (13.7.0)
Requirement already satisfied: packaging>=19.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from build) (23.2)
Collecting pyproject_hooks (from build)
Downloading pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Collecting colorama (from build)
Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: zipp>=0.5 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from importlib-metadata>=3.6->twine) (3.17.0)
Requirement already satisfied: jaraco.classes in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from keyring>=15.1->twine) (3.3.0)
Requirement already satisfied: pywin32-ctypes>=0.2.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from keyring>=15.1->twine) (0.2.2)
Requirement already satisfied: nh3>=0.2.14 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from readme-renderer>=35.0->twine) (0.2.14)
Requirement already satisfied: docutils>=0.13.1 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from readme-renderer>=35.0->twine) (0.20.1)
Requirement already satisfied: Pygments>=2.5.1 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from readme-renderer>=35.0->twine) (2.16.1)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from requests>=2.20->twine) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from requests>=2.20->twine) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from requests>=2.20->twine) (2023.7.22)
Requirement already satisfied: markdown-it-py>=2.2.0 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from rich>=12.0.0->twine) (3.0.0)
Requirement already satisfied: mdurl~=0.1 in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from markdown-it-py>=2.2.0->rich>=12.0.0->twine) (0.1.2)
Requirement already satisfied: more-itertools in d:\programme\mambaforge\envs\enpt_test\lib\site-packages (from jaraco.classes->keyring>=15.1->twine) (10.1.0)
Downloading build-1.0.3-py3-none-any.whl (18 kB)
Installing collected packages: pyproject_hooks, colorama, build
Successfully installed build-1.0.3 colorama-0.4.6 pyproject_hooks-1.0.0
(enpt_test) D:\Daten\Code\python\enpt_enmapboxapp>python -m build --sdist
* Creating venv isolated environment...
* Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
* Getting build dependencies for sdist...
Traceback (most recent call last):
File "D:\Programme\mambaforge\envs\enpt_test\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "D:\Programme\mambaforge\envs\enpt_test\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Programme\mambaforge\envs\enpt_test\Lib\site-packages\pyproject_hooks\_in_process\_in_process.py", line 287, in get_requires_for_build_sdist
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danschef\AppData\Local\Temp\build-env-z4p0z1v2\Lib\site-packages\setuptools\build_meta.py", line 358, in get_requires_for_build_sdist
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\danschef\AppData\Local\Temp\build-env-z4p0z1v2\Lib\site-packages\setuptools\build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "C:\Users\danschef\AppData\Local\Temp\build-env-z4p0z1v2\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\danschef\AppData\Local\Temp\build-env-z4p0z1v2\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "<string>", line 42, in <module>
File "<string>", line 25, in <module>
ModuleNotFoundError: No module named 'packaging'
ERROR Backend subprocess exited when trying to invoke get_requires_for_build_sdist