-
Hello i would like to use tox with hatch but i am getting the following error PS F:\Workspace\abacus-icalc> tox -e py39
py39 inst-nodeps: F:\Workspace\abacus-icalc\.tox\.tmp\package\1\abacus_icalc-0.2.3.dev4+g87221ad.d20220420.tar.gz
ERROR: invocation failed (exit code 1), logfile: F:\Workspace\abacus-icalc\.tox\py39\log\py39-10.log
================================================================== log start ==================================================================
Processing f:\workspace\abacus-icalc\.tox\.tmp\package\1\abacus_icalc-0.2.3.dev4+g87221ad.d20220420.tar.gz
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: 'F:\Workspace\abacus-icalc\.tox\py39\Scripts\python.EXE' 'F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Sandorex\AppData\Local\Temp\tmp3tzskyw7'
cwd: C:\Users\Sandorex\AppData\Local\Temp\pip-req-build-54ixiigu
Complete output (42 lines):
Traceback (most recent call last):
File "F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 126, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'hatchling.build' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 1167, in version
self._version = self.version_source.get_version_data()['version']
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 1179, in version_source
raise ValueError('Missing `tool.hatch.version` configuration')
ValueError: Missing `tool.hatch.version` configuration
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 280, in <module>
main()
File "F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 130, in prepare_metadata_for_build_wheel
return _get_wheel_metadata_from_wheel(backend, metadata_directory,
File "F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py", line 159, in _get_wheel_metadata_from_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\build.py", line 41, in build_wheel
return os.path.basename(next(builder.build(wheel_directory, ['standard'])))
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line
144, in build
artifact = version_api[version](directory, **build_data)
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\builders\wheel.py", line 228, in build_standard
metadata_directory = '{}.dist-info'.format(self.project_id)
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\builders\plugin\interface.py", line
308, in project_id
self.metadata.version,
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 60, in version
self._set_version()
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 153, in _set_version
version = self.hatch.version
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 1170, in version
'Error getting the version from source `{}`: {}'.format(self.version_source.PLUGIN_NAME, e)
File "C:\Users\Sandorex\AppData\Local\Temp\pip-build-env-i7tuvsam\overlay\Lib\site-packages\hatchling\metadata\core.py", line 1179, in version_source
raise ValueError('Missing `tool.hatch.version` configuration')
ValueError: Missing `tool.hatch.version` configuration
----------------------------------------
WARNING: Discarding file:///F:/Workspace/abacus-icalc/.tox/.tmp/package/1/abacus_icalc-0.2.3.dev4%2Bg87221ad.d20220420.tar.gz. Command errored out with exit status 1: 'F:\Workspace\abacus-icalc\.tox\py39\Scripts\python.EXE' 'F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Sandorex\AppData\Local\Temp\tmp3tzskyw7' Check the logs for full command output.
ERROR: Command errored out with exit status 1: 'F:\Workspace\abacus-icalc\.tox\py39\Scripts\python.EXE' 'F:\Workspace\abacus-icalc\.tox\py39\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\Sandorex\AppData\Local\Temp\tmp3tzskyw7' Check the logs for full command output.
WARNING: You are using pip version 21.1.2; however, version 22.0.4 is available.
You should consider upgrading via the 'F:\Workspace\abacus-icalc\.tox\py39\Scripts\python.EXE -m pip install --upgrade pip' command.
=================================================================== log end ===================================================================
___________________________________________________________________ summary ___________________________________________________________________
ERROR: py39: InvocationError for command 'F:\Workspace\abacus-icalc\.tox\py39\Scripts\python.EXE' -m pip install --no-deps -U '.tox\.tmp\package\1\abacus_icalc-0.2.3.dev4+g87221ad.d20220420.tar.gz' (exited with code 1) My [version]
source = "vcs"
fallback-version = '0.0.0'
[build]
include = [
"abacus/**" # include everything inside the package
]
[build.hooks.vcs]
version-file = "abacus/__info__.py"
template = """\
# file generated by setuptools_scm
# don't change, don't track in version control
__version__ = {version!r}
__version_info__ = {version_tuple!r}
"""
[build.targets.sdist]
[build.targets.wheel]
packages = ["abacus"] and [tox]
envlist = py38, py39
isolated_build = True
[testenv:check]
commands = py.test --cov {envsitepackagesdir}/abacus --cov-report=term
deps =
; .[full]
hatch-vcs
pytest
coverage
pytest-cov
[pytest]
python_files = test_*.py
norecursedirs = .tox |
Beta Was this translation helpful? Give feedback.
Answered by
sandorex
Apr 20, 2022
Replies: 1 comment 1 reply
-
Figured it out, [build.targets.sdist]
include = ["hatch.toml"] |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
sandorex
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Figured it out,
hatch.toml
is not included in sdist by default so i had to add