tech-pkg archive

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

un-self-conficting python packages for non-default python



Hi,

I carry some local patches that apply a common pattern to enable me
building the same set of packages with differing python versions. My
scripted builds have a selection of packages and a selection of python
versions, all py-foo packages being built with all respective
PYTHON_VERSION_REQD values.

I need to avoid installing unversioned files, except for the default
python version. The non-default builds might be not very useful (in
case the unversioned file in $PREFIX/bin is the whole point), but it's
nasty having to guess if a package using the py-foo scheme with
changing names depending on configured python version is actually
installable in parallel with differing pythons.

Anyhow … is this type of change acceptable in pkgsrc? Something obvious
that I should do instead?

-- pkgsrc-2022Q1/devel/py-build/Makefile       2022-05-20 15:05:56.000000000 +0200
+++ pkgsrc/devel/py-build/Makefile      2023-01-05 21:33:21.630747696 +0100
@@ -26,5 +26,17 @@
 DEPENDS+=      ${PYPKGPREFIX}-importlib-metadata-[0-9]*:../../devel/py-importlib-metadata
 .endif
 
+# Install convenience script to bin (unversioned)
+# only if we are building for default python version.
+# This is a hack for my environment where I set
+# PYTHON_VERSION_REQD in bulk builds.
+PLIST_VARS+=   bin
+.if !empty(PYTHON_VERSION_REQD) && ${PYTHON_VERSION_REQD} != ${PYTHON_VERSION_DEFAULT}
+post-install:
+       ${RM} ${DESTDIR}${PREFIX}/bin/pyproject-build
+.else
+PLIST.bin=     yes
+.endif
+
 .include "../../lang/python/egg.mk"
 .include "../../mk/bsd.pkg.mk"
diff -ruN pkgsrc-2022Q1/devel/py-build/PLIST pkgsrc/devel/py-build/PLIST
--- pkgsrc-2022Q1/devel/py-build/PLIST  2022-05-20 15:05:56.000000000 +0200
+++ pkgsrc/devel/py-build/PLIST 2023-01-05 20:18:35.648226135 +0100
@@ -1,5 +1,5 @@
 @comment $NetBSD: PLIST,v 1.1 2021/11/25 21:18:28 wiz Exp $
-bin/pyproject-build
+${PLIST.bin}bin/pyproject-build
 ${PYSITELIB}/${EGG_INFODIR}/PKG-INFO
 ${PYSITELIB}/${EGG_INFODIR}/SOURCES.txt
 ${PYSITELIB}/${EGG_INFODIR}/dependency_links.txt



Alrighty then,

Thomas

PS: Yes, I'm trying to trim down my patches that were waiting too long
already to get committed … shortly before the freeze … 

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index