Index: textproc/py-tomli/Makefile =================================================================== --- textproc/py-tomli/Makefile +++ textproc/py-tomli/Makefile @@ -2,6 +2,7 @@ PORTNAME= tomli PORTVERSION= 2.0.1 +PORTREVISION= 1 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -12,12 +13,27 @@ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE -USES= python:3.7+ -USE_PYTHON= autoplist concurrent distutils +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>0:devel/py-flit-core@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR} + +USES= python +USE_PYTHON= allflavors concurrent flavors NO_ARCH= yes -post-patch: - @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py +do-build: + cd ${BUILD_WRKSRC} && ${PYTHON_CMD} -m flit_core.wheel + +do-install: + @(${MKDIR} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}) + ${PYTHON_CMD} -m installer \ + -d ${STAGEDIR} --no-compile-bytecode \ + ${BUILD_WRKSRC}/dist/${PORTNAME}-${PORTVERSION}-*.whl + +post-install: + # autoplist + ${SED} -e 's|^|${PYTHONPREFIX_SITELIBDIR:S;^${PREFIX}/;;}/|' -e 's|\,.*$$||' \ + ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/${PORTNAME}-${PORTVERSION}.dist-info/RECORD | \ + ${SORT} > ${TMPPLIST} .include Index: textproc/py-tomli/files/setup.py =================================================================== --- textproc/py-tomli/files/setup.py +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/env python -# setup.py generated by flit for tools that don't yet use PEP 517 - -from distutils.core import setup - -packages = \ -['tomli'] - -package_data = \ -{'': ['*']} - -package_dir = \ -{'': 'src'} - -setup(name='tomli', - version='%%PORTVERSION%%', - description="A lil' TOML parser", - author=None, - author_email='Taneli Hukkinen ', - url=None, - packages=packages, - package_data=package_data, - package_dir=package_dir, - python_requires='>=3.7', - )