git: c05aee5dce2c - main - devel/py-hatchling: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:27:25 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=c05aee5dce2c8afdcf1ec601593688ae56efdb1b

commit c05aee5dce2c8afdcf1ec601593688ae56efdb1b
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:44:03 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:20:40 +0000

    devel/py-hatchling: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 devel/py-hatchling/Makefile       |  8 ++---
 devel/py-hatchling/files/setup.py | 64 ---------------------------------------
 2 files changed, 3 insertions(+), 69 deletions(-)

diff --git a/devel/py-hatchling/Makefile b/devel/py-hatchling/Makefile
index f237164f593d..a720dbdf82dc 100644
--- a/devel/py-hatchling/Makefile
+++ b/devel/py-hatchling/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	hatchling
 PORTVERSION=	1.12.2
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,13 +12,14 @@ WWW=		https://github.com/pypa/hatch/tree/master/backend
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE.txt
 
+BUILD_DEPENDS=	${RUN_DEPENDS}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}editables>=0.3:devel/py-editables@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pathspec>=0.10.1:devel/py-pathspec@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}pluggy>=1.0.0:devel/py-pluggy@${PY_FLAVOR}
 
 USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USE_PYTHON=	autoplist concurrent pep517
 
 NO_ARCH=	yes
 
@@ -31,8 +33,4 @@ RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0:devel/py-importlib-me
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}tomli>=1.2.2:textproc/py-tomli@${PY_FLAVOR}
 .endif
 
-post-patch:
-	@${RM} ${WRKSRC}/pyproject.toml
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.post.mk>
diff --git a/devel/py-hatchling/files/setup.py b/devel/py-hatchling/files/setup.py
deleted file mode 100644
index d9f707a25dc9..000000000000
--- a/devel/py-hatchling/files/setup.py
+++ /dev/null
@@ -1,64 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-setup(
-    name='hatchling',
-    version='%%PORTVERSION%%',
-    description='Modern, extensible Python build backend',
-    long_description='# Hatchling\n\n<div align="center">\n\n<img src="https://raw.githubusercontent.com/pypa/hatch/master/docs/assets/images/logo.svg" alt="Hatch logo" width="500" role="img">\n\n| | |\n| --- | --- |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatchling.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatchling/) [![PyPI - Downloads](https://img.shields.io/pypi/dm/hatchling.svg?color=blue&label=Downloads&logo=pypi&logoColor=gold)](https://pypi.org/project/hatchling/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatchling.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatchling/) |\n| Meta | [![Hatch project](https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg)](https://github.com/pypa/hatch) [![linting - Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v0.json)](https://github.com/charliermarsh/ruff) [![code style - B
 lack](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![types - Mypy](https://img.shields.io/badge/types-Mypy-blue.svg)](https://github.com/python/mypy) [![License - MIT](https://img.shields.io/badge/license-MIT-9400d3.svg)](https://spdx.org/licenses/) [![GitHub Sponsors](https://img.shields.io/github/sponsors/ofek?logo=GitHub%20Sponsors&style=social)](https://github.com/sponsors/ofek) |\n\n</div>\n\n-----\n\nThis is the extensible, standards compliant build backend used by [Hatch](https://github.com/pypa/hatch).\n\n## Usage\n\nThe following snippet must be present in your project\'s `pyproject.toml` file in order to use Hatchling as your build backend:\n\n```toml\n[build-system]\nrequires = ["hatchling"]\nbuild-backend = "hatchling.build"\n```\n\nThen a build frontend like [pip](https://github.com/pypa/pip), [build](https://github.com/pypa/build), or Hatch itself can build or install your project automatically:\n\n```console\n# install us
 ing pip\npip install /path/to/project\n\n# b!
 uild\npython -m build /path/to/project\n\n# build with Hatch\nhatch build /path/to/project\n```\n\n## Documentation\n\n- [Project metadata](https://hatch.pypa.io/latest/config/metadata/)\n- [Dependencies](https://hatch.pypa.io/latest/config/dependency/)\n- [Packaging](https://hatch.pypa.io/latest/config/build/)\n',
-    author_email='Ofek Lev <oss@ofek.dev>',
-    classifiers=[
-        'Development Status :: 5 - Production/Stable',
-        'Intended Audience :: Developers',
-        'License :: OSI Approved :: MIT License',
-        'Natural Language :: English',
-        'Operating System :: OS Independent',
-        'Programming Language :: Python :: 3.7',
-        'Programming Language :: Python :: 3.8',
-        'Programming Language :: Python :: 3.9',
-        'Programming Language :: Python :: 3.10',
-        'Programming Language :: Python :: 3.11',
-        'Programming Language :: Python :: Implementation :: CPython',
-        'Programming Language :: Python :: Implementation :: PyPy',
-        'Topic :: Software Development :: Build Tools',
-        'Topic :: Software Development :: Libraries :: Python Modules',
-    ],
-    install_requires=[
-        'editables>=0.3',
-        'importlib-metadata; python_version < "3.8"',
-        'packaging>=21.3',
-        'pathspec>=0.10.1',
-        'pluggy>=1.0.0',
-        'tomli>=1.2.2; python_version < "3.11"',
-    ],
-    entry_points={
-        'console_scripts': [
-            'hatchling = hatchling.cli:hatchling',
-        ],
-    },
-    packages=[
-        'hatchling',
-        'hatchling.bridge',
-        'hatchling.builders',
-        'hatchling.builders.hooks',
-        'hatchling.builders.hooks.plugin',
-        'hatchling.builders.plugin',
-        'hatchling.cli',
-        'hatchling.cli.build',
-        'hatchling.cli.dep',
-        'hatchling.cli.metadata',
-        'hatchling.cli.version',
-        'hatchling.dep',
-        'hatchling.licenses',
-        'hatchling.metadata',
-        'hatchling.metadata.plugin',
-        'hatchling.plugin',
-        'hatchling.utils',
-        'hatchling.version',
-        'hatchling.version.scheme',
-        'hatchling.version.scheme.plugin',
-        'hatchling.version.source',
-        'hatchling.version.source.plugin',
-    ],
-    package_dir={'': 'src'},
-)