Skip to content

pyproject-api-py new package version 1.9.0 - #1238

Open
sth0 wants to merge 1 commit into
fink:masterfrom
sth0:pyprojects-api-py-sth
Open

pyproject-api-py new package version 1.9.0#1238
sth0 wants to merge 1 commit into
fink:masterfrom
sth0:pyprojects-api-py-sth

Conversation

@sth0

@sth0 sth0 commented Apr 20, 2025

Copy link
Copy Markdown
Contributor

Necessary for tox-py to run tests. See PR#1223
WIP, does not pass 2 tests. Not sure if this is fault of the code or if the asserts have a wrong format?
Does this require the "wheel" package to be installed? I don't think so but I might be misinterpreting the error message of "requirement(wheel).
Error1:

_________________ test_setuptools_get_requires_for_build_wheel _________________

frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x10bfd9c00>

    def test_setuptools_get_requires_for_build_wheel(frontend_setuptools: SubprocessFrontend) -> None:
        result = frontend_setuptools.get_requires_for_build_wheel()
>       assert not result.requires
E       assert not (<Requirement('wheel')>,)
E        +  where (<Requirement('wheel')>,) = RequiresBuildWheelResult(requires=(<Requirement('wheel')>,), out="started backend BackendProxy(backend=<module 'setuptools.build_meta' from '/opt/sw/lib/python3.10/site-packages/setuptools/build_meta.py'>)\nBackend: run command get_requires_for_build_wheel with args {'config_settings': None}\nrunning egg_info\nwriting demo.egg-info/PKG-INFO\nwriting dependency_links to demo.egg-info/dependency_links.txt\nwriting entry points to demo.egg-info/entry_points.txt\nwriting requirements to demo.egg-info/requires.txt\nwriting top-level names to demo.egg-info/top_level.txt\nreading manifest file 'demo.egg-info/SOURCES.txt'\nwriting manifest file 'demo.egg-info/SOURCES.txt'\nBackend: Wrote response {'return': ['wheel']} to /private/tmp/pep517_get_requires_for_build_wheel-bput5dqs.json\n", err="listing git files failed - pretending there aren't any\n").requires

tests/test_frontend_setuptools.py:62: AssertionError

And error 2, which looks like it should pass except the conditions have parenthesis around them

_______________ test_setuptools_prepare_metadata_for_build_wheel _______________

frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x10bfd9c00>
tmp_path = PosixPath('/private/tmp/pytest-of-fink-bld/pytest-0/test_setuptools_prepare_metada0')

    def test_setuptools_prepare_metadata_for_build_wheel(frontend_setuptools: SubprocessFrontend, tmp_path: Path) -> None:
        meta = tmp_path / "meta"
        result = frontend_setuptools.prepare_metadata_for_build_wheel(metadata_directory=meta)
        assert result is not None
        dist = Distribution.at(str(result.metadata))
        assert list(dist.entry_points) == [EntryPoint(name="demo_exe", value="demo:a", group="console_scripts")]
        assert dist.version == "1.0"
        assert dist.metadata["Name"] == "demo"
        values = [v for k, v in dist.metadata.items() if k == "Requires-Dist"]  # type: ignore[attr-defined]
        # ignore because "PackageMetadata" has no attribute "items"
        expected = ["magic>3", "requests>2"] if sys.version_info[0:2] > (3, 8) else ["magic >3", "requests >2"]
>       assert sorted(values) == expected
E       AssertionError: assert ['magic (>3)', 'requests (>2)'] == ['magic>3', 'requests>2']
E         At index 0 diff: 'magic (>3)' != 'magic>3'
E         Full diff:
E         - ['magic>3', 'requests>2']
E         + ['magic (>3)', 'requests (>2)']
E         ?        ++  +            ++  +

tests/test_frontend_setuptools.py:78: AssertionError

Necessary for tox-py to run tests.  See PR#1223
@sth0 sth0 added help wanted new package Packages that do not yet exist in Fink. labels Apr 20, 2025
@sth0 sth0 self-assigned this Apr 20, 2025
@dmacks

dmacks commented Jun 21, 2025

Copy link
Copy Markdown
Member

New upstream 1.9.1 mentions a fix regarding dropping requirement for wheel.

@nieder

nieder commented Aug 23, 2026

Copy link
Copy Markdown
Member

1.9.1 still fails the wheel test

_________________________________________________________________ test_setuptools_get_requires_for_build_wheel _________________________________________________________________

frontend_setuptools = <pyproject_api._via_fresh_subprocess.SubprocessFrontend object at 0x107f711b0>

    def test_setuptools_get_requires_for_build_wheel(frontend_setuptools: SubprocessFrontend) -> None:
        result = frontend_setuptools.get_requires_for_build_wheel()
>       assert not result.requires
E       assert not (<Requirement('wheel')>,)
E        +  where (<Requirement('wheel')>,) = RequiresBuildWheelResult(requires=(<Requirement('wheel')>,), out="started backend BackendProxy(backend=<module 'setuptools.build_meta' from '/opt/sw/lib/python3.10/site-packages/setuptools/build_meta.py'>)\nBackend: run command get_requires_for_build_wheel with args {'config_settings': None}\nrunning egg_info\nwriting demo.egg-info/PKG-INFO\nwriting dependency_links to demo.egg-info/dependency_links.txt\nwriting entry points to demo.egg-info/entry_points.txt\nwriting requirements to demo.egg-info/requires.txt\nwriting top-level names to demo.egg-info/top_level.txt\nreading manifest file 'demo.egg-info/SOURCES.txt'\nwriting manifest file 'demo.egg-info/SOURCES.txt'\nBackend: Wrote response {'return': ['wheel']} to /private/tmp/pep517_get_requires_for_build_wheel-0br_qv6x.json\n", err="listing git files failed - pretending there aren't any\n").requires

tests/test_frontend_setuptools.py:62: AssertionError
=========================================================================== short test summary info ============================================================================
FAILED tests/test_frontend_setuptools.py::test_setuptools_get_requires_for_build_wheel - assert not (<Requirement('wheel')>,)

Could be an issue with setuptools, which will be impossible to track down given that's not very stable between versions: tox-dev/pyproject-api#153

@sth0

sth0 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor Author

So what is the way forward? Should we remove the test calling setup tools as a subprocess and declare it unstable? I really don't want to mess with setup tools!j

@nieder

nieder commented Aug 30, 2026

Copy link
Copy Markdown
Member

Just add test_setuptools_get_requires_for_build_wheel to the skipped tests.

By the way, at least on 26.6, py310 at version 1.10.0 only fails that test. The other test test_eventlet_spawn_n_bug that's currently being skipped in your submission I think has been removed or gets automatically skipped, so it'll be worth to check on your system if it still needs to be explicitly skipped if you bump to v1.10.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted new package Packages that do not yet exist in Fink.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants