[Bug 268893] Mk/Uses/python.mk: need a way to specify wheel name != PORTNAME

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 11 Jan 2023 19:01:35 UTC

            Bug ID: 268893
           Summary: Mk/Uses/python.mk: need a way to specify wheel name !=
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: amdmi3@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

I've decided to give pep517 support a try by converting one of my ports
(devel/py-pytest-asyncio) which no longer provides setup.py. I've run into an
installation problem, as the wheel name (pytest_asyncio) appears to be
different from the module/port name (which is pytest-asyncio, as mentioned in
setup.cfg), while the framework blindly uses PORTNAME. This happens:

===>  Building for py39-pytest-asyncio-0.20.3
Successfully built pytest_asyncio-0.20.3-py3-none-any.whl
===>   Generating temporary packing list
FileNotFoundError: [Errno 2] No such file or directory:

I'm not sure where the name mangling happens, but our framework
name mangling for egg names, so I assume a similar thing is required here.

See attached a patch that converts py-pytest-asyncio to pep517 and a patch that
fixes the framework for it. The latter is likely incomplete (may need to use
wheel name in more places and may need similar handling for the version).

You are receiving this mail because:
You are on the CC list for the bug.