On Mon, Apr 20, 2020 at 07:33:09PM +0200, Klemens Nanni wrote:
> Leatherman is a dependency of facter which is a dependency of puppet.
> I was surprised to see Python 2 being installed on new puppet nodes;
> turns out leatherman chips a single script called cpplint.py that is
> rather big and Python 2 exclusively.
>
> Assuming that leatherman is most prominently installed for its C++ and
> CMake libs, I'd rather suggest the optional dependency in a message as
> follows:
>
> $ doas make update
> ...
> leatherman-1.11.0->1.11.0p0: ok
> Read shared items: ok
> --- +leatherman-1.11.0p0 -------------------
> To use the cpplint.py script, install the required Python version:
>
> # pkg_add python%2.7
>
> This avoids installing uneeded and deprecated Python 2 on any of my
> puppet nodes.
>
>
> Feedback? OK?
Ping.
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/leatherman/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile 28 Mar 2020 22:04:02 -0000 1.35
+++ Makefile 20 Apr 2020 17:17:43 -0000
@@ -5,6 +5,7 @@ COMMENT = collection of C++ and CMake u
GH_ACCOUNT = puppetlabs
GH_PROJECT = leatherman
GH_TAGNAME = 1.11.0
+REVISION = 0
# N.B.: Upstream doesn't care about ABI, better just bump major on update
SHARED_LIBS = leatherman_curl 1.1 # 0.12
@@ -26,7 +27,9 @@ PERMIT_PACKAGE = Yes
COMPILER = base-clang ports-gcc
MODULES = devel/cmake lang/python
+MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
MODPY_BUILDDEP = No
+MODPY_RUNDEP = No
MODPY_ADJ_FILES = scripts/cpplint.py
WANTLIB = ${COMPILER_LIBCXX} m
Index: pkg/MESSAGE
===================================================================
RCS file: pkg/MESSAGE
diff -N pkg/MESSAGE
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/MESSAGE 20 Apr 2020 17:19:43 -0000
@@ -0,0 +1,3 @@
+To use the cpplint.py script, install the required Python version:
+
+ # pkg_add python%${MODPY_VERSION}