Index: lang/Makefile =================================================================== --- lang/Makefile +++ lang/Makefile @@ -275,6 +275,7 @@ SUBDIR += python-doc-pdf-letter SUBDIR += python-doc-text SUBDIR += python-mode.el + SUBDIR += python-pycache SUBDIR += python-tools SUBDIR += python2 SUBDIR += python27 Index: lang/python-pycache/Makefile =================================================================== --- /dev/null +++ lang/python-pycache/Makefile @@ -0,0 +1,11 @@ +PORTNAME= python-pycache +PORTVERSION= 0.0.1 +CATEGORIES= lang + +MAINTAINER= portmgr@FreeBSD.org +COMMENT= Trigger to recreate python precompiled bytecode + +USES= trigger metaport +TRIGGERS= python-update-cache + +.include Index: lang/python-pycache/files/python-update-cache.ucl.in =================================================================== --- /dev/null +++ lang/python-pycache/files/python-update-cache.ucl.in @@ -0,0 +1,37 @@ +path_glob: "%%PREFIX%%/lib/python*/site-packages/*" +cleanup: { + type: lua + sandbox: false + script: <=0:lang/python-pycache USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \ shebangfix ssl tar:xz Index: lang/python311/Makefile =================================================================== --- lang/python311/Makefile +++ lang/python311/Makefile @@ -15,6 +15,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache>=0:lang/python-pycache USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \ shebangfix ssl tar:xz Index: lang/python37/Makefile =================================================================== --- lang/python37/Makefile +++ lang/python37/Makefile @@ -15,6 +15,7 @@ LIB_DEPENDS= libffi.so:devel/libffi \ libmpdec.so:math/mpdecimal +RUN_DEPENDS= python-pycache>=0:lang/python-pycache USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in Index: lang/python38/Makefile =================================================================== --- lang/python38/Makefile +++ lang/python38/Makefile @@ -14,6 +14,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache>=0:lang/python-pycache USES= cpe ncurses pathfix pkgconfig readline shebangfix ssl tar:xz PATHFIX_MAKEFILEIN= Makefile.pre.in Index: lang/python39/Makefile =================================================================== --- lang/python39/Makefile +++ lang/python39/Makefile @@ -14,6 +14,7 @@ LICENSE= PSFL LIB_DEPENDS= libffi.so:devel/libffi +RUN_DEPENDS= python-pycache>=0:lang/python-pycache USES= compiler:c11 cpe ncurses pathfix pkgconfig readline \ shebangfix ssl tar:xz