BSD Ports

devel/py-makefun 1.16.0nb1 NetBSD

Small library to dynamically create Python functions

System
NetBSD
Repository
pkgsrc
Maintainer
[email protected]
License
modified-bsd
Categories
devel, python
Package size
38.2 KiB, 216.2 KiB installed

Description

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.

In the other systems

SystemPortVersion
NetBSDdevel/py-makefun1.16.0nb1
FreeBSDdevel/py-makefun1.16.0_1
OpenBSDdevel/py-makefun1.16.0
DragonFlydevel/py-makefun1.15.4_1
HardenedBSDdevel/py-makefun1.16.0_1
GhostBSDdevel/py-makefun1.16.0_1

Install

Binary package:

pkgin install py311-makefun

From pkgsrc:

cd /usr/pkgsrc/devel/py-makefun && make install clean

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

RepositoryVersion
NetBSD 10.1 x86_641.16.0nb1
NetBSD 10.1 aarch641.16.0nb1
SmartOS / illumos x86_641.16.0nb1
macOS 15 arm641.16.0nb1

Dependencies

Run dependencies 1

No port depends on this one.

Configuration

No options to configure.

Service scripts
none
Flavors
py312-makefun-1.16.0nb1, py313-makefun-1.16.0nb1, py314-makefun-1.16.0nb1