As far as plists go, unless the port only supports py2 or only supports py3, it ought to generate the plist with FLAVOR=python3 and then prefix any lines ending in ${MODPY_PYCACHE}/ with ${MODPY_COMMENT}.

--
Sent from a phone, apologies for poor formatting.

On 12 May 2019 21:30:34 Andrew Hewus Fresh <[email protected]> wrote:

Kurt, you're welcome to commit this whenever you think it's good enough.
I say, with the improvements this week, OK afresh1@

I'm not quite sure what "plist smarts" it needs, but let me know if
there is something I'm missing.

On Sun, Feb 03, 2019 at 11:44:41PM +0000, Stuart Henderson wrote:
I asked tsg about this before, IIRC it was intentionally omitted as it
wasn't considered finished. (For starters it could do with some plist
smarts).

On Sun, Feb 03, 2019 at 09:22:31PM +0000, Linda Lapinlampi wrote:
/usr/ports/infrastructure/bin/portgen supports "py" type, as seen in the
source code:

if ( $type eq 'p5' ) {
        $o = OpenBSD::PortGen::Port::CPAN->new();
} elsif ( $type eq 'py' ) {
        $o = OpenBSD::PortGen::Port::PyPI->new();
} elsif ( $type eq 'ruby' ) {
        $o = OpenBSD::PortGen::Port::Ruby->new();
} else {
        die "unknown module type\n";
}

This "py" type also works to generate ports from PyPI sources, mostly.
It's not documented in the man page though.

Attached diff adds a mention of the type to portgen(1) man page.

Index: portgen.1
===================================================================
RCS file: /cvs/src/share/man/man1/portgen.1,v
retrieving revision 1.1
diff -u -p -u -p -r1.1 portgen.1
--- portgen.1   26 Jun 2018 05:38:49 -0000      1.1
+++ portgen.1   3 Feb 2019 21:15:33 -0000
@@ -50,6 +50,8 @@ values:
 .Bl -inset -offset indent -compact
 .It Cm p5
 for Perl modules on CPAN.
+.It Cm py
+for Python modules on PyPI.
 .It Cm ruby
 for Ruby gems.
 .El



Reply via email to