On 10/07/2024 22:43, Stuart Henderson wrote: > On 2024/07/10 21:23, Fabien Romano wrote: >> Please see previous thread. >> >> https://marc.info/?l=openbsd-ports&m=171472517500931&w=2 >> >> Same tgz attached. Maybe it also need your patches/patch-setup_py. > > I think this one is slightly closer to being ready to import, so I'll > comment on this one but some of the bits from Artsiom's port would be > good to bring in. > > : GH_ACCOUNT= nickdiego > : GH_PROJECT= compiledb > : GH_TAGNAME= v0.10.1 > : MODPY_EGG_VERSION= ${GH_TAGNAME:S/v//} > : DISTNAME= compiledb-${MODPY_EGG_VERSION} > ... > : HOMEPAGE= https://github.com/nickdiego/compiledb > > with these GH_* variables, DISTNAME automatically defaults to this, > so better to just skip it. ("make show=DISTNAME", "make show=PKGNAMES") > > Also HOMEPAGE is set automatically from GH_ACCOUNT/PROJECT so we > normally skip that in these cases too. > > : RUN_DEPENDS= devel/py-click \ > : textproc/py-bashlex \ > : shells/bash > > The python deps are missing ${MODPY_FLAVOR} suffix > > : +import shutil > : from subprocess import PIPE > : > : -from shutilwhich import which > : - > : from compiledb.utils import popen > : > : _logger = logging.getLogger(__name__) > : @@ -37,7 +36,7 @@ class Compiler: > : > : def _find_full_path(self): > : """Get a full path to the compiler executable.""" > : - full_path = which(self.name) > : + full_path = shutil.which(self.name) > > I prefer the simpler patch from Artsiom's port here, > > -from shutilwhich import which > +from shutil import which
Please check updated tgz. I could not resist to switch it to DIST_TUPLE, am I wrong ? Regarding shutilwhich, I kept Artsiom diff and mention the PR. > pkg/DESCR > : Tool for generating Clang's JSON Compilation Database file for GNU > make-based > : build systems. > > it would be helpful to give a quick explanation of what this is useful > for. > > What about this one ? Tool for generating Clang's JSON Compilation Database file for GNU make-based build systems. The generated compile_commands.json in combination with clangd (devel/clang-tools-extra) language server provides IDE-like features to editors such as code completion, compile errors, go-to-definition and more.
compiledb.tgz
Description: application/compressed-tar