devel/py-installer: convert to USE_PYTHON=pep517

This is the second port used to bootstrap PEP-517 tooling and the
default staging driver for ports built under USE_PYTHON=pep517.
python@ will be maintaining this going forward as infrastructure.

https://wiki.freebsd.org/Python/PEP-517

With hat: python
Approved by: maintainer timeout, fluffy (mentor)
Differential Revision: https://reviews.freebsd.org/D34789
This commit is contained in:
Charlie Li 2022-04-05 20:34:42 -04:00
parent 33898683ee
commit 70c7afe71d
No known key found for this signature in database
GPG key ID: FEB7852BE29B3E87
2 changed files with 9 additions and 32 deletions

View file

@ -1,22 +1,24 @@
PORTNAME= installer
PORTVERSION= 0.6.0
DISTVERSION= 0.6.0
PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= sunpoet@FreeBSD.org
MAINTAINER= python@FreeBSD.org
COMMENT= Library for installing Python wheels
WWW= https://github.com/pypa/installer
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python:3.7+
USE_PYTHON= autoplist concurrent distutils
USES= python
USE_PYTHON= allflavors autoplist concurrent pep517
PEP517_BUILD_CMD= ${PYTHON_CMD} -m flit_core.wheel
PEP517_BUILD_DEPEND= ${PYTHON_PKGNAMEPREFIX}flit-core>0:devel/py-flit-core@${PY_FLAVOR}
PEP517_INSTALL_DEPEND=
MAKE_ENV+= PYTHONPATH=${BUILD_WRKSRC}/src
NO_ARCH= yes
post-patch:
@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
.include <bsd.port.mk>

View file

@ -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 = \
['installer', 'installer._scripts']
package_data = \
{'': ['*']}
package_dir = \
{'': 'src'}
setup(name='installer',
version='%%PORTVERSION%%',
description='A library for installing Python wheels.',
author=None,
author_email='Pradyun Gedam <pradyunsg@gmail.com>',
url=None,
packages=packages,
package_data=package_data,
package_dir=package_dir,
python_requires='>=3.7',
)