Solved Building Python36 packages

Hello,
I try to build the py-kwalify package for Python36. As an example, I have used the Makefile for py-colorama. Here's my makefile :
Code:
PORTNAME=       pykwalify
PORTVERSION=    1.7.0
CATEGORIES=     devel python
MASTER_SITES=   CHEESESHOP
PKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}

MAINTAINER=     ygy@FreeBSD.org
COMMENT=        Python lib/cli for JSON/YAML schema validation

LICENSE=        MIT
LICENSE_FILE=   ${WRKSRC}/LICENSE

NO_ARCH=        yes
USES=           python
USE_PYTHON=     distutils autoplist

.include <bsd.port.mk>
All is fine, but it builds a package for Python27 by default. I have tried PYTHON_VERSION=python36, in this case the content of the package is correct (all goes in /usr/share/python36, but the name of the package is still py27-kwalify.xxx.txz.
The original pakage (py-colorama) is available for both Python27 and Python36 (with the same Makefile?), so what is the trick to do the same?
Of course, I have read (badly?) porter's hanbook ;)
Thanks in advance
 
The original pakage (py-colorama) is available for both Python27 et Python36 (with the same Makefile?), so what is the trick to do the same?
FLAVOR is the trick. The same port is used to build different FLAVORs of Python.

So, to build it specifically with a Python 3.6 flavor you use make FLAVOR=py36 {....}. If you don't supply the FLAVOR it simply assumes the default (which is Python 2.7).
 
Back
Top