==> Building on electivire ==> Checking for remote environment... ==> Syncing package to remote host... sending incremental file list ./ .SRCINFO 700 79% 0.00kB/s 0:00:00 886 100% 181.64kB/s 0:00:00 (xfr#1, to-chk=7/9) .nvchecker.toml 54 100% 52.73kB/s 0:00:00 54 100% 52.73kB/s 0:00:00 (xfr#2, to-chk=6/9) LICENSE 646 100% 630.86kB/s 0:00:00 646 100% 630.86kB/s 0:00:00 (xfr#3, to-chk=5/9) PKGBUILD 700 41% 683.59kB/s 0:00:00 1,697 100% 1.62MB/s 0:00:00 (xfr#4, to-chk=4/9) REUSE.toml 375 100% 366.21kB/s 0:00:00 375 100% 366.21kB/s 0:00:00 (xfr#5, to-chk=3/9) python-hatchling-1.29.0-1.1.log 697 100% 680.66kB/s 0:00:00 697 100% 680.66kB/s 0:00:00 (xfr#6, to-chk=2/9) LICENSES/ sent 843 bytes received 204 bytes 2,094.00 bytes/sec total size is 3,865 speedup is 3.69 ==> Running pkgctl build --arch riscv64 on remote host... ==> WARNING: invalid architecture: riscv64 ==> Updating pacman database cache [?25l:: Synchronizing package databases... core downloading... extra downloading... multilib downloading... [?25h==> Building python-hatchling  -> repo: extra  -> arch: riscv64  -> worker: felix-1 ==> Building python-hatchling for [extra] (riscv64) ]3008;start=b040c88435c049338ea3e12a7fcb5c84;user=root;hostname=electivire.felixc.at;machineid=20663a96e205491681a8d81de8d4d2fb;bootid=2380f8a6111944a98a21067e470d98b8;pid=2623315;pidfdid=62017183;comm=systemd-nspawn;container=arch-nspawn-2623315;type=container\]11;?\]2;🔵 Container arch-nspawn-2623315 on electivire.felixc.at\[?25l:: Synchronizing package databases... core downloading... extra downloading... :: Starting full system upgrade... there is nothing to do [?25h[!p]104\[?7h]3008;end=b040c88435c049338ea3e12a7fcb5c84\==> Building in chroot for [extra] (riscv64)... ==> Synchronizing chroot copy [/var/lib/archbuild/extra-riscv64/root] -> [felix-1]...done ==> Making package: python-hatchling 1.29.0-1.1 (Mon May 25 16:22:24 2026) ==> Retrieving sources...  -> Found hatchling-v1.29.0.tar.gz ==> Validating source files with sha256sums... hatchling-v1.29.0.tar.gz ... Passed ]3008;start=f408305d5dac452b8fde3158e6a1b828;user=root;hostname=electivire.felixc.at;machineid=20663a96e205491681a8d81de8d4d2fb;bootid=2380f8a6111944a98a21067e470d98b8;pid=2624321;pidfdid=62084869;comm=systemd-nspawn;container=arch-nspawn-2624321;type=container\]11;?\]2;🔵 Container arch-nspawn-2624321 on electivire.felixc.at\==> Making package: python-hatchling 1.29.0-1.1 (Mon May 25 08:22:35 2026) ==> Checking runtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (5) New Version Net Change extra/python-editables 0.6-1 0.04 MiB extra/python-packaging 26.2-1 1.23 MiB extra/python-pathspec 1.1.1-1 0.47 MiB extra/python-pluggy 1.6.0-3.1 0.23 MiB extra/python-trove-classifiers 2026.5.20.19-1 0.16 MiB Total Installed Size: 2.13 MiB :: Proceed with installation? [Y/n] checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-editables... installing python-packaging... installing python-pathspec... Optional dependencies for python-pathspec python-google-re2: re2 backend installing python-pluggy... installing python-trove-classifiers... :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [?25h==> Checking buildtime dependencies... ==> Installing missing dependencies... [?25lresolving dependencies... looking for conflicting packages... Package (30) New Version Net Change Download Size extra/python-autocommand 2.2.2-9 0.08 MiB extra/python-hatchling 1.29.0-1 1.06 MiB extra/python-iniconfig 2.3.0-1 0.07 MiB extra/python-jaraco.collections 5.1.0-3 0.11 MiB extra/python-jaraco.context 6.1.2-1 0.06 MiB extra/python-jaraco.functools 4.1.0-3 0.07 MiB extra/python-jaraco.text 4.0.0-4 0.08 MiB extra/python-markdown-it-py 4.0.0-2.1 0.77 MiB extra/python-mdurl 0.1.2-9 0.06 MiB extra/python-more-itertools 11.1.0-1 0.77 MiB extra/python-pkg_resources 81.0.0-1 0.50 MiB extra/python-platformdirs 4.9.6-1 0.40 MiB extra/python-pygments 2.20.0-1 15.36 MiB extra/python-pyproject-hooks 1.2.0-6 0.11 MiB extra/python-setuptools 1:82.0.1-1 7.35 MiB extra/python-setuptools-scm 10.0.5-1 0.15 MiB 0.04 MiB extra/python-typing_extensions 4.15.0-3 0.52 MiB extra/python-vcs-versioning 1.1.1-1 0.80 MiB 0.15 MiB extra/python-wheel 0.46.3-1 0.31 MiB extra/uv 0.11.16-1 53.81 MiB core/libxcrypt-compat 4.5.2-1 0.19 MiB extra/python-build 1.4.2-1 0.25 MiB extra/python-click 8.3.3-1 1.38 MiB 0.23 MiB extra/python-filelock 3.29.0-1 0.46 MiB extra/python-hatch-vcs 0.5.0-4.1 0.04 MiB extra/python-installer 1.0.0-1 0.20 MiB extra/python-pytest 1:8.4.2-3 4.69 MiB extra/python-rich 15.0.0-1 4.49 MiB extra/python-tomli-w 1.2.0-2 0.04 MiB extra/python-uv 0.11.16-1 0.73 MiB Total Download Size: 0.42 MiB Total Installed Size: 94.90 MiB :: Proceed with installation? [Y/n] :: Retrieving packages... python-click-8.3.3-1-any downloading... python-vcs-versioning-1.1.1-1-any downloading... python-setuptools-scm-10.0.5-1-any downloading... checking keyring... checking package integrity... loading package files... checking for file conflicts... :: Processing package changes... installing python-pyproject-hooks... installing python-build... Optional dependencies for python-build python-pip: to use as the Python package installer (default) python-uv: to use as the Python package installer [pending] python-virtualenv: to use virtualenv for build isolation installing python-installer... installing libxcrypt-compat... installing python-click... installing python-filelock... installing python-hatchling... installing python-more-itertools... installing python-jaraco.functools... installing python-jaraco.context... installing python-autocommand... installing python-jaraco.text... Optional dependencies for python-jaraco.text python-inflect: for show-newlines script installing python-jaraco.collections... installing python-platformdirs... installing python-wheel... Optional dependencies for python-wheel python-keyring: for wheel.signatures python-xdg: for wheel.signatures python-setuptools: for legacy bdist_wheel subcommand [pending] installing python-typing_extensions... installing python-pkg_resources... installing python-setuptools... installing python-vcs-versioning... installing python-setuptools-scm... Optional dependencies for python-setuptools-scm python-rich: use rich as console log handler [pending] installing python-hatch-vcs... installing python-iniconfig... installing python-pygments... installing python-pytest... installing python-mdurl... installing python-markdown-it-py... Optional dependencies for python-markdown-it-py python-mdit_py_plugins: core plugins python-linkify-it-py: linkify extension installing python-rich... installing python-tomli-w... installing uv... installing python-uv... :: Running post-transaction hooks... (1/1) Arming ConditionNeedsUpdate... [?25h==> Retrieving sources...  -> Found hatchling-v1.29.0.tar.gz ==> WARNING: Skipping all source file integrity checks. ==> Extracting sources...  -> Extracting hatchling-v1.29.0.tar.gz with bsdtar ==> Starting build()... * Getting build dependencies for wheel... * Building wheel... Successfully built hatchling-1.29.0-py3-none-any.whl ==> Starting check()... * Building wheel... Successfully built hatch-1.29.0-py3-none-any.whl ============================= test session starts ============================== platform linux -- Python 3.14.5, pytest-8.4.2, pluggy-1.6.0 rootdir: /build/python-hatchling/src/hatch-hatchling-v1.29.0 configfile: pyproject.toml collected 969 items tests/backend/builders/hooks/test_custom.py ...... [ 0%] tests/backend/builders/hooks/test_version.py ............ [ 1%] tests/backend/builders/plugin/test_interface.py ........................ [ 4%] [ 4%] tests/backend/builders/test_binary.py ssssssssssssssssssssssssssssss [ 7%] tests/backend/builders/test_config.py .................................. [ 10%] ........................................................................ [ 18%] .....................................................................s.. [ 25%] .s.s...s.s.s..s...s...s.s.s.s.s.s.s.s.....s...s...s.... [ 31%] tests/backend/builders/test_custom.py ......... [ 32%] tests/backend/builders/test_sdist.py ................................... [ 36%] .............. [ 37%] tests/backend/builders/test_wheel.py ................................... [ 41%] .................................................FFFFFFFFFF.......sssss. [ 48%] ...... [ 49%] tests/backend/metadata/test_build.py ............. [ 50%] tests/backend/metadata/test_core.py .................................... [ 54%] ........................................................................ [ 61%] ....................................................................... [ 68%] tests/backend/metadata/test_custom_hook.py ...... [ 69%] tests/backend/metadata/test_hatch.py ........................... [ 72%] tests/backend/metadata/test_spec.py .................................... [ 76%] ........................................................................ [ 83%] ..................... [ 85%] tests/backend/test_build.py ... [ 85%] tests/backend/utils/test_context.py ......................... [ 88%] tests/backend/utils/test_fs.py .. [ 88%] tests/backend/utils/test_macos.py .......... [ 89%] tests/backend/version/scheme/test_standard.py .......................... [ 92%] ............................ [ 95%] tests/backend/version/source/test_code.py .......... [ 96%] tests/backend/version/source/test_env.py .... [ 96%] tests/backend/version/source/test_regex.py ............................. [ 99%] .. [100%] =================================== FAILURES =================================== ___________________ TestBuildStandard.test_editable_default ____________________ self = hatch = helpers = temp_dir = Path('/tmp/tmp4xevkomq') @fixed_pathlib_resolution def test_editable_default(self, hatch, helpers, temp_dir): project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "src/my_app/__about__.py"}, "build": {"targets": {"wheel": {"versions": ["editable"]}}}, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_pth", project_name, metadata_directory=metadata_directory, package_paths=[str(project_path / "src")], ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2530: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmp4xevkomq/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_my_app.pth,...fo/RECORD,,\n' E E - _my_app.pth,sha256=g0aKvqbVw196dvD4sM1tWK9MB6GZCrPm7QeQf8Td-NI,27 E + _editable_impl_my_app.pth,sha256=g0aKvqbVw196dvD4sM1tWK9MB6GZCrPm7QeQf8Td-NI,27 E ? ++++++++++++++ E my_app-0.0.1.dist-info/METADATA,sha256=KYGltXNeIpK347Ucoy6rvwwJuoCBkDNHdhrnd0pQOJA,76 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError __________ TestBuildStandard.test_editable_default_extra_dependencies __________ self = hatch = helpers = temp_dir = Path('/tmp/tmpdnky7sik') @fixed_pathlib_resolution def test_editable_default_extra_dependencies(self, hatch, helpers, temp_dir): project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" build_script = project_path / DEFAULT_BUILD_SCRIPT build_script.write_text( helpers.dedent( """ import pathlib from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomHook(BuildHookInterface): def initialize(self, version, build_data): build_data['dependencies'].append('binary') """ ) ) config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "src/my_app/__about__.py"}, "build": {"targets": {"wheel": {"versions": ["editable"], "hooks": {"custom": {}}}}}, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_pth_extra_dependencies", project_name, metadata_directory=metadata_directory, package_paths=[str(project_path / "src")], ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2602: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmpdnky7sik/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_my_app.pth,...fo/RECORD,,\n' E E - _my_app.pth,sha256=2_op__OKu3bEsTteBiIuGdfOKV4b3rLWMOWzoQSTOoY,27 E + _editable_impl_my_app.pth,sha256=2_op__OKu3bEsTteBiIuGdfOKV4b3rLWMOWzoQSTOoY,27 E ? ++++++++++++++ E my_app-0.0.1.dist-info/METADATA,sha256=eeCkK_Vn4mX0vhwmBXNT8SHlv1pyFq0iz2tHR2A_sIw,98 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError ____________ TestBuildStandard.test_editable_default_force_include _____________ self = hatch = helpers = temp_dir = Path('/tmp/tmptfvonrbp') @fixed_pathlib_resolution def test_editable_default_force_include(self, hatch, helpers, temp_dir): project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" build_script = project_path / DEFAULT_BUILD_SCRIPT build_script.write_text( helpers.dedent( """ import pathlib from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomHook(BuildHookInterface): def initialize(self, version, build_data): # Prefix z just to satisfy our ordering test assertion build_data['force_include_editable']['src/my_app/__about__.py'] = 'zfoo.py' """ ) ) config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "src/my_app/__about__.py"}, "build": {"targets": {"wheel": {"versions": ["editable"], "hooks": {"custom": {}}}}}, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_pth_force_include", project_name, metadata_directory=metadata_directory, package_paths=[str(project_path / "src")], ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2675: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmptfvonrbp/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_my_app.pth,...fo/RECORD,,\n' E E - _my_app.pth,sha256=LtyN-m88_hvZIE6SLpNnhfQy0Gg3EMfkJ3BOhNLk-w4,27 E + _editable_impl_my_app.pth,sha256=LtyN-m88_hvZIE6SLpNnhfQy0Gg3EMfkJ3BOhNLk-w4,27 E ? ++++++++++++++ E zfoo.py,sha256=cHtf8WXbWYfmW6Y-svqpziSfhQbNfFYysvx5rtwICZ0,116 E my_app-0.0.1.dist-info/METADATA,sha256=KYGltXNeIpK347Ucoy6rvwwJuoCBkDNHdhrnd0pQOJA,76 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError _________ TestBuildStandard.test_editable_default_force_include_option _________ self = hatch = helpers = temp_dir = Path('/tmp/tmpjesp8783') @fixed_pathlib_resolution def test_editable_default_force_include_option(self, hatch, helpers, temp_dir): project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "src/my_app/__about__.py"}, "build": { "targets": { "wheel": { "versions": ["editable"], "force-include": {"src/my_app/__about__.py": "zfoo.py"}, } } }, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_pth_force_include", project_name, metadata_directory=metadata_directory, package_paths=[str(project_path / "src")], ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2739: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmpjesp8783/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_my_app.pth,...fo/RECORD,,\n' E E - _my_app.pth,sha256=_8VIG3qijnufSwV2rhDlAEbeEa00oyK2ies6c1bYf7c,27 E + _editable_impl_my_app.pth,sha256=_8VIG3qijnufSwV2rhDlAEbeEa00oyK2ies6c1bYf7c,27 E ? ++++++++++++++ E zfoo.py,sha256=cHtf8WXbWYfmW6Y-svqpziSfhQbNfFYysvx5rtwICZ0,116 E my_app-0.0.1.dist-info/METADATA,sha256=KYGltXNeIpK347Ucoy6rvwwJuoCBkDNHdhrnd0pQOJA,76 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError _______________ TestBuildStandard.test_editable_default_symlink ________________ self = hatch = helpers = temp_dir = Path('/tmp/tmph3r3awpv') @pytest.mark.requires_unix def test_editable_default_symlink(self, hatch, helpers, temp_dir): project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" symlink = project_path / "_" / "my_app" symlink.parent.ensure_dir_exists() symlink.symlink_to(project_path / "src" / "my_app") config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "src/my_app/__about__.py"}, "build": {"targets": {"wheel": {"versions": ["editable"]}}}, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_pth", project_name, metadata_directory=metadata_directory, package_paths=[str(project_path / "src")], ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2799: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmph3r3awpv/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_my_app.pth,...fo/RECORD,,\n' E E - _my_app.pth,sha256=CKjXID649rwhXmrbjea93motO7KT7FqRR6cPB4axQ1w,27 E + _editable_impl_my_app.pth,sha256=CKjXID649rwhXmrbjea93motO7KT7FqRR6cPB4axQ1w,27 E ? ++++++++++++++ E my_app-0.0.1.dist-info/METADATA,sha256=KYGltXNeIpK347Ucoy6rvwwJuoCBkDNHdhrnd0pQOJA,76 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError ____________________ TestBuildStandard.test_editable_exact _____________________ self = hatch = helpers = temp_dir = Path('/tmp/tmpilc6gp34') config_file = @fixed_pathlib_resolution def test_editable_exact(self, hatch, helpers, temp_dir, config_file): config_file.model.template.plugins["default"]["src-layout"] = False config_file.save() project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "my_app/__about__.py"}, "build": {"targets": {"wheel": {"versions": ["editable"], "dev-mode-exact": True}}}, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_exact", project_name, metadata_directory=metadata_directory, package_root=str(project_path / "my_app" / "__init__.py"), ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2859: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmpilc6gp34/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_editable_im...fo/RECORD,,\n' E E + _editable_impl_my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E _editable_impl_my_app.py,sha256=8DpsxO8B7BbBk9CB-80_y9SsPgUbJz76v4xzNoOpglg,136 E - _my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E my_app-0.0.1.dist-info/METADATA,sha256=4ZWWu9XQ2nbq4w8vaMQHyC-Y5BVPLHAVEto8Oe6QDrk,106 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError ___________ TestBuildStandard.test_editable_exact_extra_dependencies ___________ self = hatch = helpers = temp_dir = Path('/tmp/tmpq3nw_4nx') config_file = @fixed_pathlib_resolution def test_editable_exact_extra_dependencies(self, hatch, helpers, temp_dir, config_file): config_file.model.template.plugins["default"]["src-layout"] = False config_file.save() project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" build_script = project_path / DEFAULT_BUILD_SCRIPT build_script.write_text( helpers.dedent( """ import pathlib from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomHook(BuildHookInterface): def initialize(self, version, build_data): build_data['dependencies'].append('binary') """ ) ) config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "my_app/__about__.py"}, "build": { "targets": { "wheel": {"versions": ["editable"], "dev-mode-exact": True, "hooks": {"custom": {}}} } }, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_exact_extra_dependencies", project_name, metadata_directory=metadata_directory, package_root=str(project_path / "my_app" / "__init__.py"), ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:2938: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmpq3nw_4nx/_archive') expected_files = [, , , , ] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_editable_im...fo/RECORD,,\n' E E + _editable_impl_my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E _editable_impl_my_app.py,sha256=I0wwar7ZDHH9bVhyCrBeBqQFsW8cVqrOVXHlwx6hGLQ,136 E - _my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E my_app-0.0.1.dist-info/METADATA,sha256=mBOYNRA9PEGFDee5nlwpx7Cv9hJci06pGC4UTvBrn_k,128 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError _____________ TestBuildStandard.test_editable_exact_force_include ______________ self = hatch = helpers = temp_dir = Path('/tmp/tmp4zjf579z') config_file = @fixed_pathlib_resolution def test_editable_exact_force_include(self, hatch, helpers, temp_dir, config_file): config_file.model.template.plugins["default"]["src-layout"] = False config_file.save() project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" build_script = project_path / DEFAULT_BUILD_SCRIPT build_script.write_text( helpers.dedent( """ import pathlib from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomHook(BuildHookInterface): def initialize(self, version, build_data): # Prefix z just to satisfy our ordering test assertion build_data['force_include_editable']['my_app/__about__.py'] = 'zfoo.py' """ ) ) config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "my_app/__about__.py"}, "build": { "targets": { "wheel": {"versions": ["editable"], "dev-mode-exact": True, "hooks": {"custom": {}}} } }, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_exact_force_include", project_name, metadata_directory=metadata_directory, package_root=str(project_path / "my_app" / "__init__.py"), ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:3018: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmp4zjf579z/_archive') expected_files = [, , , , , ...] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_editable_im...fo/RECORD,,\n' E E + _editable_impl_my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E _editable_impl_my_app.py,sha256=HfUI1WKqbrs6JZvp8P9Cqhmj0fAuHG_4RlTzDDdOtIY,136 E - _my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E zfoo.py,sha256=cHtf8WXbWYfmW6Y-svqpziSfhQbNfFYysvx5rtwICZ0,116 E my_app-0.0.1.dist-info/METADATA,sha256=4ZWWu9XQ2nbq4w8vaMQHyC-Y5BVPLHAVEto8Oe6QDrk,106 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError __________ TestBuildStandard.test_editable_exact_force_include_option __________ self = hatch = helpers = temp_dir = Path('/tmp/tmpk2wkipiz') config_file = @fixed_pathlib_resolution def test_editable_exact_force_include_option(self, hatch, helpers, temp_dir, config_file): config_file.model.template.plugins["default"]["src-layout"] = False config_file.save() project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "my_app/__about__.py"}, "build": { "targets": { "wheel": { "versions": ["editable"], "dev-mode-exact": True, "force-include": {"my_app/__about__.py": "zfoo.py"}, } } }, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_exact_force_include", project_name, metadata_directory=metadata_directory, package_root=str(project_path / "my_app" / "__init__.py"), ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:3086: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmpk2wkipiz/_archive') expected_files = [, , , , , ...] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_editable_im...fo/RECORD,,\n' E E + _editable_impl_my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E _editable_impl_my_app.py,sha256=2XC0CLnz4CfztbnGLaSp1apQdjuY11wYNpXSaUIZYOc,136 E - _my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E zfoo.py,sha256=cHtf8WXbWYfmW6Y-svqpziSfhQbNfFYysvx5rtwICZ0,116 E my_app-0.0.1.dist-info/METADATA,sha256=4ZWWu9XQ2nbq4w8vaMQHyC-Y5BVPLHAVEto8Oe6QDrk,106 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError __ TestBuildStandard.test_editable_exact_force_include_build_data_precedence ___ self = hatch = helpers = temp_dir = Path('/tmp/tmp9lcvbn06') config_file = @fixed_pathlib_resolution def test_editable_exact_force_include_build_data_precedence(self, hatch, helpers, temp_dir, config_file): config_file.model.template.plugins["default"]["src-layout"] = False config_file.save() project_name = "My.App" with temp_dir.as_cwd(): result = hatch("new", project_name) assert result.exit_code == 0, result.output project_path = temp_dir / "my-app" build_script = project_path / DEFAULT_BUILD_SCRIPT build_script.write_text( helpers.dedent( """ import pathlib from hatchling.builders.hooks.plugin.interface import BuildHookInterface class CustomHook(BuildHookInterface): def initialize(self, version, build_data): # Prefix z just to satisfy our ordering test assertion build_data['force_include_editable']['my_app/__about__.py'] = 'zfoo.py' """ ) ) config = { "project": {"name": project_name, "dynamic": ["version"]}, "tool": { "hatch": { "version": {"path": "my_app/__about__.py"}, "build": { "targets": { "wheel": { "versions": ["editable"], "dev-mode-exact": True, "force-include": {"my_app/__about__.py": "zbar.py"}, "hooks": {"custom": {}}, } } }, }, }, } builder = WheelBuilder(str(project_path), config=config) build_path = project_path / "dist" build_path.mkdir() with project_path.as_cwd(): artifacts = list(builder.build(directory=str(build_path))) assert len(artifacts) == 1 expected_artifact = artifacts[0] build_artifacts = list(build_path.iterdir()) assert len(build_artifacts) == 1 assert expected_artifact == str(build_artifacts[0]) assert expected_artifact == str(build_path / f"{builder.project_id}-{get_python_versions_tag()}-none-any.whl") extraction_directory = temp_dir / "_archive" extraction_directory.mkdir() with zipfile.ZipFile(str(expected_artifact), "r") as zip_archive: zip_archive.extractall(str(extraction_directory)) metadata_directory = f"{builder.project_id}.dist-info" expected_files = helpers.get_template_files( "wheel.standard_editable_exact_force_include", project_name, metadata_directory=metadata_directory, package_root=str(project_path / "my_app" / "__init__.py"), ) > helpers.assert_files(extraction_directory, expected_files) /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/backend/builders/test_wheel.py:3171: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ directory = Path('/tmp/tmp9lcvbn06/_archive') expected_files = [, , , , , ...] def assert_files(directory, expected_files, *, check_contents=True): start = str(directory) expected_relative_files = {str(f.path): f.contents for f in expected_files} seen_relative_file_paths = set() for root, _, files in os.walk(directory): relative_path = os.path.relpath(root, start) # First iteration if relative_path == ".": relative_path = "" for file_name in files: relative_file_path = os.path.join(relative_path, file_name) seen_relative_file_paths.add(relative_file_path) if check_contents and relative_file_path in expected_relative_files: file_path = os.path.join(start, relative_file_path) expected_contents = expected_relative_files[relative_file_path] try: with open(file_path, encoding="utf-8") as f: > assert f.read() == expected_contents, relative_file_path E AssertionError: my_app-0.0.1.dist-info/RECORD E assert '_editable_im...fo/RECORD,,\n' == '_editable_im...fo/RECORD,,\n' E E + _editable_impl_my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E _editable_impl_my_app.py,sha256=NCjGiT9XyjqcPECGpn-RtoPsSizX88SZirSYvFhvQQc,136 E - _my_app.pth,sha256=AR2kh5K9fvhIUZFFetHFXh1bj7qxHoTAzZ_SXMHARzs,28 E zfoo.py,sha256=cHtf8WXbWYfmW6Y-svqpziSfhQbNfFYysvx5rtwICZ0,116 E my_app-0.0.1.dist-info/METADATA,sha256=4ZWWu9XQ2nbq4w8vaMQHyC-Y5BVPLHAVEto8Oe6QDrk,106 E my_app-0.0.1.dist-info/WHEEL,sha256=e22IIVjxDyt0lABi4WpktFIGsmO_ebSDXLnPUbPK0E0,105 E my_app-0.0.1.dist-info/licenses/LICENSE.txt,sha256=eRDxJBmE9M_9v2pmeTr2O0xJJdzdCHvoZoyU0HLIf-I,1086 E my_app-0.0.1.dist-info/RECORD,, /build/python-hatchling/src/hatch-hatchling-v1.29.0/tests/helpers/helpers.py:86: AssertionError =========================== short test summary info ============================ FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_default FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_default_extra_dependencies FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_default_force_include FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_default_force_include_option FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_default_symlink FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_exact FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_exact_extra_dependencies FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_exact_force_include FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_exact_force_include_option FAILED tests/backend/builders/test_wheel.py::TestBuildStandard::test_editable_exact_force_include_build_data_precedence ================= 10 failed, 905 passed, 54 skipped in 16.55s ================== ==> ERROR: A failure occurred in check().  Aborting... [!p]104\[?7h]3008;end=f408305d5dac452b8fde3158e6a1b828\==> ERROR: Build failed, check /var/lib/archbuild/extra-riscv64/felix-1/build [?25h[?25h[?25hreceiving incremental file list python-hatchling-1.29.0-1.1-riscv64-build.log python-hatchling-1.29.0-1.1-riscv64-check.log sent 62 bytes received 4,878 bytes 9,880.00 bytes/sec total size is 58,773 speedup is 11.90