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
| System | Port | Version |
|---|---|---|
| NetBSD | devel/py-makefun | 1.16.0nb1 |
| FreeBSD | devel/py-makefun | 1.16.0_1 |
| OpenBSD | devel/py-makefun | 1.16.0 |
| DragonFly | devel/py-makefun | 1.15.4_1 |
| HardenedBSD | devel/py-makefun | 1.16.0_1 |
| GhostBSD | devel/py-makefun | 1.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.
| Repository | Version |
|---|---|
| NetBSD 10.1 x86_64 | 1.16.0nb1 |
| NetBSD 10.1 aarch64 | 1.16.0nb1 |
| SmartOS / illumos x86_64 | 1.16.0nb1 |
| macOS 15 arm64 | 1.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