From nobody Wed Aug 31 11:42:23 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MHj2l6cx4z4b7Zc; Wed, 31 Aug 2022 11:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MHj2l6BRSz4Hp3; Wed, 31 Aug 2022 11:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661946143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=42BYuu0SV7IHa+ST+iFW4wFdQplGKf6/MiTFA4OeqJ4=; b=Ix7b58J2mKOuegjASDAhColh+i6lHAHjfmUQykNFRSpQkayvpfyCQk1RY22s0ueg18K2To yL3lJ334YhXQ8DnXdy1SC97Th0rvNXbMSLJWxwztTos5HQSU59BqE8MJ95sp5FeDUbnwzw b6Qg2CZ2r914+bcFzFwI0wDxk+Px5/cPy1u6alDOTAKPrrG9cPKf7u+fkvBCUG9RCqUezP BfI4DXkfndqlOIldRVChI73POJ+5srA/I8+IB5nQX14RWusck78q22AiTwtN1geIv2+1s9 qZ4wDxiRBwcMstLEEVpdMcOvQo5l/dKQtVLqsXeP5LQtQA5JUF7SFWXeTENHDg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MHj2l5Ghcz16Tf; Wed, 31 Aug 2022 11:42:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27VBgNmc092905; Wed, 31 Aug 2022 11:42:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27VBgND7092893; Wed, 31 Aug 2022 11:42:23 GMT (envelope-from git) Date: Wed, 31 Aug 2022 11:42:23 GMT Message-Id: <202208311142.27VBgND7092893@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 881aa4620e8e - main - devel/py-hatch-vcs: Add py-hatch-vcs 0.2.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 881aa4620e8eb05d89d57841d8fb633ec5738af7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661946143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=42BYuu0SV7IHa+ST+iFW4wFdQplGKf6/MiTFA4OeqJ4=; b=mMe6TA0sLv+UPcHxFrLo05zmg+m12GmtfEDjh3mEy/lf/VT0tmzsCEcM2TMZzK2jDbUcEx xLQSr5+NYP5/IfXO2G4RnnzHEMbVdOPSgMX0+xCQSz0zkV0p4ZQ2XGxlEgJxcrDKQug8vL 7U7HaW7JB403ADOHZbTA+OFYF4dnX+rLN06n+HXFXcgnh62cF6rdC3WDb/YmpUeGu22kuS okBsteN5/MFpenQ6xh+1/F4oLFUEm3bJk9E1mcH9WjEThIcEh/+sLaWxDhR6qnludVztgW AVPtlI12rv3kY7aD2Cz22wU1gn7gboYZfW2HBqXKjRF26RsozDGgMw7SM2ZLtg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661946143; a=rsa-sha256; cv=none; b=IX9hlSr0gKaNeOYzwoNOU4GvyGGLNKtpO4Ls7ZrCNZQu+xx4Fi9EmwrBR0Ubcqz6bUciBi X8pMFJGb+MfXpAqY2a2De4kOsv8rXHMx0qHHzG0ZR9BdRqh3vEgWLvGKzava7ixCmepefv LuZCQTdNvdyecw8bjhn4peVvaCS1viKei5hkt2ssXULN3jz1BO8Q3TEJWxnjMvkA+afIUR y1y/YUPhYjRgbOmSYBK8bE/AuXYaaUs8gae5VZ8BUyIZK8sjmKjBDFiVub9qsBGcRuJeVf 950deTk5IDYOVyR8SuC7+KUTkTHujtqEfzxug1i4o6SaUDA1W91WPmqKEzJcNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=881aa4620e8eb05d89d57841d8fb633ec5738af7 commit 881aa4620e8eb05d89d57841d8fb633ec5738af7 Author: Po-Chuan Hsieh AuthorDate: 2022-08-31 11:21:10 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-08-31 11:40:48 +0000 devel/py-hatch-vcs: Add py-hatch-vcs 0.2.0 hatch-vcs provides a plugin for Hatch that uses your preferred version control system (like Git) to determine project versions. WWW: https://github.com/ofek/hatch-vcs --- devel/Makefile | 1 + devel/py-hatch-vcs/Makefile | 26 ++++++++++++++++++++++++++ devel/py-hatch-vcs/distinfo | 3 +++ devel/py-hatch-vcs/files/setup.py | 34 ++++++++++++++++++++++++++++++++++ devel/py-hatch-vcs/pkg-descr | 4 ++++ 5 files changed, 68 insertions(+) diff --git a/devel/Makefile b/devel/Makefile index 6520f15b0288..4eaca442b651 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4598,6 +4598,7 @@ SUBDIR += py-gyp SUBDIR += py-hash_ring SUBDIR += py-hatch + SUBDIR += py-hatch-vcs SUBDIR += py-hatchling SUBDIR += py-heapdict SUBDIR += py-helpdev diff --git a/devel/py-hatch-vcs/Makefile b/devel/py-hatch-vcs/Makefile new file mode 100644 index 000000000000..555a5ceb0658 --- /dev/null +++ b/devel/py-hatch-vcs/Makefile @@ -0,0 +1,26 @@ +PORTNAME= hatch-vcs +PORTVERSION= 0.2.0 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= hatch_vcs-${PORTVERSION} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Hatch plugin for versioning with your preferred VCS + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatchling>=0.21.0:devel/py-hatchling@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}setuptools_scm>=6.4.0:devel/py-setuptools_scm@${PY_FLAVOR} + +USES= python:3.7+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +post-patch: + @${RM} ${WRKSRC}/pyproject.toml + @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py + +.include diff --git a/devel/py-hatch-vcs/distinfo b/devel/py-hatch-vcs/distinfo new file mode 100644 index 000000000000..32ecd222273f --- /dev/null +++ b/devel/py-hatch-vcs/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1661599113 +SHA256 (hatch_vcs-0.2.0.tar.gz) = 9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff +SIZE (hatch_vcs-0.2.0.tar.gz) = 9321 diff --git a/devel/py-hatch-vcs/files/setup.py b/devel/py-hatch-vcs/files/setup.py new file mode 100644 index 000000000000..65c2ddb0e1d3 --- /dev/null +++ b/devel/py-hatch-vcs/files/setup.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +setup( + name='hatch-vcs', + version='%%PORTVERSION%%', + description='Hatch plugin for versioning with your preferred VCS', + long_description='# hatch-vcs\n\n| | |\n| --- | --- |\n| CI/CD | [![CI - Test](https://github.com/ofek/hatch-vcs/actions/workflows/test.yml/badge.svg)](https://github.com/ofek/hatch-vcs/actions/workflows/test.yml) [![CD - Build](https://github.com/ofek/hatch-vcs/actions/workflows/build.yml/badge.svg)](https://github.com/ofek/hatch-vcs/actions/workflows/build.yml) |\n| Package | [![PyPI - Version](https://img.shields.io/pypi/v/hatch-vcs.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/hatch-vcs/) [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-vcs.svg?logo=python&label=Python&logoColor=gold)](https://pypi.org/project/hatch-vcs/) |\n| Meta | [![code style - black](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/ambv/black) [![imports - isort](https://img.shields.io/badge/imports-isort-ef8336.svg)](https://github. com/pycqa/isort) [![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-----\n\nThis provides a plugin for [Hatch](https://github.com/ofek/hatch) that uses your preferred version control system (like Git) to determine project versions.\n\n**Table of Contents**\n\n- [Global dependency](#global-dependency)\n- [Version source](#version-source)\n - [Version source options](#version-source-options)\n- [Build hook](#build-hook)\n - [Build hook options](#build-hook-options)\n- [License](#license)\n\n## Global dependency\n\nEnsure `hatch-vcs` is defined within the `build-system.requires` field in your `pyproject.toml` file.\n\n```toml\n[build-system]\nrequires = ["hatchling", "hatch-vcs"]\nbuild-backend = "hatchling.build"\n```\n\n## Version source\n\nThe [version source plugin](https://ofek.dev/hatch/lat est/plugins/version-source/) name is `vcs`.\! n\n- ***pyproject.toml***\n\n ```toml\n [tool.hatch.version]\n source = "vcs"\n ```\n\n- ***hatch.toml***\n\n ```toml\n [version]\n source = "vcs"\n ```\n\n### Version source options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `tag-pattern` | `str` | see [code](https://github.com/pypa/setuptools_scm/blob/v6.4.0/src/setuptools_scm/config.py#L13) | A regular expression used to extract the version part from VCS tags. The pattern needs to contain either a single match group, or a group named `version`, that captures the actual version information. |\n| `fallback-version` | `str` | | The version that will be used if no other method for detecting the version is successful. If not specified, unsuccessful version detection will raise an error. |\n| `raw-options` | `dict` | | A table of [`setuptools-scm` parameters](https://github.com/pypa/setuptools_scm#configuration-parameters) that will override any of the options listed above. The `w rite_to` and `write_to_template` parameters are ignored. |\n\n## Build hook\n\nThe [build hook plugin](https://ofek.dev/hatch/latest/plugins/build-hook/) name is `vcs`.\n\n- ***pyproject.toml***\n\n ```toml\n [tool.hatch.build.hooks.vcs]\n ```\n\n- ***hatch.toml***\n\n ```toml\n [build.hooks.vcs]\n ```\n\n### Build hook options\n\n| Option | Type | Default | Description |\n| --- | --- | --- | --- |\n| `version-file` | `str` | ***REQUIRED*** | The relative path to the file that gets updated with the current version. |\n| `template` | `str` | | The template used to overwrite the `version-file`. See the [code](https://github.com/pypa/setuptools_scm/blob/v6.4.0/src/setuptools_scm/__init__.py#L30-L39) for the default template for each file extension. |\n\n## License\n\n`hatch-vcs` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.\n', + author_email='Ofek Lev ', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + ], + install_requires=[ + 'hatchling>=0.21.0', + 'setuptools-scm<6; python_version < "3"', + 'setuptools-scm>=6.4.0; python_version > "3"', + ], + entry_points={ + 'hatch': [ + 'vcs = hatch_vcs.hooks', + ], + }, + packages=[ + 'hatch_vcs', + ], +) diff --git a/devel/py-hatch-vcs/pkg-descr b/devel/py-hatch-vcs/pkg-descr new file mode 100644 index 000000000000..d10b5b1565b2 --- /dev/null +++ b/devel/py-hatch-vcs/pkg-descr @@ -0,0 +1,4 @@ +hatch-vcs provides a plugin for Hatch that uses your preferred version control +system (like Git) to determine project versions. + +WWW: https://github.com/ofek/hatch-vcs