pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/python



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Jan 23 19:59:25 UTC 2024

Modified Files:
        pkgsrc/lang/python: wheel.mk

Log Message:
wheel.mk: introduce PYSETUPSUBDIR


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/python/wheel.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/python/wheel.mk
diff -u pkgsrc/lang/python/wheel.mk:1.13 pkgsrc/lang/python/wheel.mk:1.14
--- pkgsrc/lang/python/wheel.mk:1.13    Tue Jan  9 22:48:13 2024
+++ pkgsrc/lang/python/wheel.mk Tue Jan 23 19:59:25 2024
@@ -1,4 +1,4 @@
-# $NetBSD: wheel.mk,v 1.13 2024/01/09 22:48:13 gutteridge Exp $
+# $NetBSD: wheel.mk,v 1.14 2024/01/23 19:59:25 adam Exp $
 #
 # Build and install Python wheels
 #
@@ -18,8 +18,9 @@
 # WHEEL_ARGS:          additional arguments to pass during build of the wheel
 
 PY_PATCHPLIST?=        yes
+PYSETUPSUBDIR?=        # empty
 
-WHEELFILE?=    ${WRKSRC}/dist/*.whl
+WHEELFILE?=    ${WRKSRC}/${PYSETUPSUBDIR}/dist/*.whl
 WHEEL_NAME?=   ${DISTNAME:C/-([^0-9])/_\1/g}
 _WHEEL_INFODIR=        ${WHEEL_NAME}.dist-info
 PLIST_SUBST+=  WHEEL_INFODIR=${_WHEEL_INFODIR}
@@ -30,25 +31,25 @@ PRINT_PLIST_AWK+=   { gsub(/${_WHEEL_INFOD
 .if !target(do-build)
 TOOL_DEPENDS+= ${PYPKGPREFIX}-build>=0:../../devel/py-build
 do-build:
-       ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} \
-               -m build --wheel --skip-dependency-check --no-isolation \
-               ${WHEEL_ARGS}
+       ${RUN} cd ${WRKSRC}/${PYSETUPSUBDIR} && \
+       ${SETENV} ${MAKE_ENV} ${TOOL_PYTHONBIN} \
+               -m build --wheel --skip-dependency-check --no-isolation ${WHEEL_ARGS}
 .endif
 
 .if !target(do-install)
 TOOL_DEPENDS+= ${PYPKGPREFIX}-installer>=0.7.0nb1:../../misc/py-installer
 do-install:
-       ${RUN} cd ${WRKSRC} && \
-       ${SETENV} ${INSTALL_ENV} \
-       ${TOOL_PYTHONBIN} -m installer --destdir ${DESTDIR:Q} \
-               --prefix ${PREFIX:Q} ${WHEELFILE}
+       ${RUN} cd ${WRKSRC}/${PYSETUPSUBDIR} && \
+       ${SETENV} ${INSTALL_ENV} ${TOOL_PYTHONBIN} \
+               -m installer --destdir ${DESTDIR:Q} --prefix ${PREFIX:Q} ${WHEELFILE}
 .endif
 
 USE_PYTEST?=   yes
 .if !target(do-test) && ${USE_PYTEST:Myes}
 TEST_DEPENDS+= ${PYPKGPREFIX}-test-[0-9]*:../../devel/py-test
 do-test:
-       ${RUN} cd ${WRKSRC} && ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
+       ${RUN} cd ${WRKSRC}/${PYSETUPSUBDIR} && \
+       ${SETENV} ${TEST_ENV} pytest-${PYVERSSUFFIX}
 .endif
 
 .include "../../lang/python/extension.mk"



Home | Main Index | Thread Index | Old Index