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.
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above. NOTE: This is a Python port. Instead of py311-makefun listed in the above command, you can pick from the names under the Packages section.
devel/py-makefun: Add py-makefun 1.16.0
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.
python: bump all USE_PYTHON=distutils consumers after RUN_DEPENDS removal
Any missed ports, feel free to bump.
Any ports that need setuptools at runtime can have the devel/py-setuptools
manually added back to RUN_DEPENDS, but understand that this practice
is deprecated; see CHANGES for details.
devel/py-setuptools-scm: update to 8.0.4
Directory and PORTNAME changed to match normalised name in release
tarball; consumers updated to match.
Although setuptools itself is specified as a run dependency in the
Python package metadata, it is currently left out here to prevent
environment pollution until at least PR 270510 is committed.
Additionally, this version of setuptools-scm requires setuptools>=61,
which means this version is only meant for USE_PYTHON=pep517 ports
as all USE_PYTHON=distutils ports will switch to devel/py-setuptools58
also after PR 270510. science/py-emmet-core is switched to
devel/py-setuptools_scm7 accordingly, as it specifies setuptools-scm<8.
devel/py-{flit-scm,hatch-vcs} have ${PY_SETUPTOOLS} added to
RUN_DEPENDS to compensate.
Further details: https://wiki.freebsd.org/Python/setuptools
Reported by: yuri
Co-authored by: matthew
Exp-run by: antoine (earlier iteration)
Approved by: yuri (science/py-emmet-core, previous iteration)
PR: 272134
Differential Revision: https://reviews.freebsd.org/D39288
devel/py-makefun: relax python version requirement
Tested in Python 3.11 virtualenv with samples from official docs - worked,
so not reason to limit to 3.9
PR: 275494
Approved by: portmgr (blanket)
all: remove explicit versions in USES=python for "3.x+"
The logic in USES=python will automatically convert this to 3.8+ by
itself.
Adjust two ports that only had Python 3.7 mentioned but build fine
on Python 3.8 too.
finance/quickfix: mark BROKEN with PYTHON
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I../.. -I -I. -I.. -I../.. -I../C++
-DLIBICONV_PLUG -DPYTHON_MAJOR_VERSION=3 -Wno-unused-variable
-Wno-maybe-uninitialized -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong
-fno-strict-aliasing -DLIBICONV_PLUG -Wall -ansi
-Wno-unused-command-line-argument -Wpointer-arith -Wwrite-strings
-Wno-overloaded-virtual -Wno-deprecated-declarations -Wno-deprecated -std=c++0x
-MT _quickfix_la-QuickfixPython.lo -MD -MP -MF
.deps/_quickfix_la-QuickfixPython.Tpo -c QuickfixPython.cpp -fPIC -DPIC -o
.libs/_quickfix_la-QuickfixPython.o
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]
QuickfixPython.cpp:175:11: fatal error: 'Python.h' file not found
^~~~~~~~~~
1 warning and 1 error generated.
Reviewed by: portmgr, vishwin, yuri
Differential Revision: <https://reviews.freebsd.org/D40568>
Remove WWW entries moved into port Makefiles
Commit b7f05445c00f has added WWW entries to port Makefiles based on
WWW: lines in pkg-descr files.
This commit removes the WWW: lines of moved-over URLs from these
pkg-descr files.
Approved by: portmgr (tcberner)
Add WWW entries to port Makefiles
It has been common practice to have one or more URLs at the end of the
ports' pkg-descr files, one per line and prefixed with "WWW:". These
URLs should point at a project website or other relevant resources.
Access to these URLs required processing of the pkg-descr files, and
they have often become stale over time. If more than one such URL was
present in a pkg-descr file, only the first one was tarnsfered into
the port INDEX, but for many ports only the last line did contain the
port specific URL to further information.
There have been several proposals to make a project URL available as
a macro in the ports' Makefiles, over time.
(Only the first 15 lines of the commit message are shown above )
devel/py-makefun: Update to 1.14.0
Changelog:
* create_wrapper, create_function, wraps and with_signature now support
lambda functions. They also accept a new parameter co_name to define the
name to be used in the compiled code.
PR: 264869
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)