From 4d1706f23138d1e3d480cc91ec28f98b1d2ef1d8 Mon Sep 17 00:00:00 2001 From: sthen Date: Tue, 28 May 2024 16:05:39 +0000 Subject: [PATCH] document MODPY_COMPILEALL, MODPY_PYTEST_USERARGS --- share/man/man5/python-module.5 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/share/man/man5/python-module.5 b/share/man/man5/python-module.5 index a05f978306f..68176567178 100644 --- a/share/man/man5/python-module.5 +++ b/share/man/man5/python-module.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: python-module.5,v 1.11 2024/04/17 13:34:23 sthen Exp $ +.\" $OpenBSD: python-module.5,v 1.12 2024/05/28 16:05:39 sthen Exp $ .\" .\" Copyright (c) 2008 Marc Espie .\" @@ -24,7 +24,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd $Mdocdate: April 17 2024 $ +.Dd $Mdocdate: May 28 2024 $ .Dt PYTHON-MODULE 5 .Os .Sh NAME @@ -165,6 +165,11 @@ to disable certain test scripts with .Sq --ignore , or to disable certain individual tests with .Sq -k . +User setting +.Ev MODPY_PYTEST_USERARGS , +if present, is passed on the command line. +This allows setting py.test flags to increase verbosity, +show test durations, enable colours, etc. .Pp All ports that generate egg-info or dist-info files should set .Ev MODPY_EGG_VERSION @@ -182,6 +187,16 @@ These filenames can be relative to ${WRKSRC} and will be modified at the end of .Cm pre-configure . .Pp +For ports not using standard Python build infrastructure, +it may be necessary to bytecode-compile installed .py files. +This can be done by using +.Ev ${MODPY_COMPILEALL} , +usually in a post-install target. +This passes flags to use MAKE_JOBS, strip off WRKINST, and use +standard optimization passes. +File or directory names can be given. +Directories are handled recursively. +.Pp This module also affects .Ev CATEGORIES , .Ev MAKE_ENV , -- 2.20.1