Bug 260879

Summary: [NEW PORT] devel/py-makefun: Dynamically create python functions with a proper signature
Product: Ports & Packages Reporter: Goran Mekić <meka>
Component: Individual Port(s)Assignee: Hiroki Tagato <tagattie>
Status: Closed FIXED    
Severity: Affects Only Me CC: tagattie
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 257369    
Attachments:
Description Flags
makefun.diff
none
makefun.diff
meka: maintainer-approval+
makefun.diff meka: maintainer-approval+

Description Goran Mekić 2022-01-02 11:06:34 UTC
Created attachment 230625 [details]
makefun.diff

QA:

  * portlint: OK (looks fine.)
  * testport: OK (poudriere: 13.0, amd64 tested)
  * maketest: OK (79 passed, 2 skipped)
Comment 1 Hiroki Tagato freebsd_committer freebsd_triage 2022-01-03 04:43:16 UTC
Here are some comments:
- Does the source archive include a license file? If so, please set LICENSE_FILE.
- According to PyPI site, the software is for python 3.5-3.9. USES=python should be more specific like USES=python:3.5-3.9.

Thanks!
Comment 2 Goran Mekić 2022-01-03 08:44:17 UTC
Created attachment 230660 [details]
makefun.diff
Comment 3 Hiroki Tagato freebsd_committer freebsd_triage 2022-01-25 10:06:25 UTC
It appears a newer version (1.13.1) has been released. Would you care to update the patch to the latest version?
Comment 4 Goran Mekić 2022-01-25 17:37:23 UTC
Created attachment 231327 [details]
makefun.diff
Comment 5 commit-hook freebsd_committer freebsd_triage 2022-01-26 07:17:14 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=120e65ad68426e6c9be44e99b3ffc45931fde288

commit 120e65ad68426e6c9be44e99b3ffc45931fde288
Author:     Goran Mekić <meka@tilda.center>
AuthorDate: 2022-01-26 07:13:28 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2022-01-26 07:16:09 +0000

    devel/py-makefun: add port: Dynamically create python functions with a proper signature

    Makefun helps you create functions dynamically, with the signature of your
    choice. It was largely inspired by decorator and functools, and created mainly
    to cover some of their limitations.

    The typical use cases are:
      * creating signature-preserving function wrappers - just like functools.wraps
      but with accurate TypeError exception raising when user-provided arguments are
      wrong, and with a very convenient way to access argument values.

      * creating function wrappers that have more or less arguments that the
      function they wrap. A bit like functools.partial but a lot more flexible and
      friendly for your users. For example, I use it in my pytest plugins to add a
      requests parameter to users' tests or fixtures when they do not already have
      it.

      * more generally, creating functions with a signature derived from a reference
      signature, or even creating functions with a signature completely defined at
      runtime.

    WWW: https://github.com/smarie/python-makefun

    PR:             260879
    Reported by:    Goran Mekić <meka@tilda.center> (new maintainer)

 devel/Makefile                   |  1 +
 devel/py-makefun/Makefile (new)  | 30 ++++++++++++++++++++++++++++++
 devel/py-makefun/distinfo (new)  |  3 +++
 devel/py-makefun/pkg-descr (new) | 20 ++++++++++++++++++++
 4 files changed, 54 insertions(+)
Comment 6 Hiroki Tagato freebsd_committer freebsd_triage 2022-01-26 07:18:00 UTC
Committed, thanks!