devel/py-pytoolconfig: Add new port: Python Tool Configuration

Project to manage configuration for python tools, such as black and
rope and add support for a pyproject.toml configuration file.

https://pypi.org/project/pytoolconfig/
This commit is contained in:
Rainer Hurling 2023-01-12 14:29:09 +01:00
parent 6f9a79b970
commit 06ef76ad42
5 changed files with 48 additions and 0 deletions

View File

@ -5259,6 +5259,7 @@
SUBDIR += py-pythonfinder
SUBDIR += py-pythran
SUBDIR += py-pytimeparse
SUBDIR += py-pytoolconfig
SUBDIR += py-pytools
SUBDIR += py-pytrie
SUBDIR += py-pytvmaze

View File

@ -0,0 +1,30 @@
PORTNAME= pytoolconfig
PORTVERSION= 1.2.4
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= rhurlin@FreeBSD.org
COMMENT= Python Tool Configuration
WWW= https://pypi.org/project/pytoolconfig/
LICENSE= LGPL3+
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-pep517>0:devel/py-pdm-pep517@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}black>=0:devel/py-black@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}platformdirs>=2.2.0:devel/py-platformdirs@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}pydantic>=1.7.4:devel/py-pydantic@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx>=4.5.0:textproc/py-sphinx@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx-autodoc-typehints>0:textproc/py-sphinx-autodoc-typehints@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mypy>=0:devel/py-mypy@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tabulate>0:devel/py-tabulate@${PY_FLAVOR}
USES= python:3.7+ pytest
USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
TIMESTAMP = 1672476705
SHA256 (pytoolconfig-1.2.4.tar.gz) = 5e1a246f77970ddb5f3d8d06fbf162424b8a1adfc22c2eb51826b383bf293d1e
SIZE (pytoolconfig-1.2.4.tar.gz) = 15910

View File

@ -0,0 +1,11 @@
--- tests/test_pytoolconfig.py.orig 2022-06-28 03:43:15 UTC
+++ tests/test_pytoolconfig.py
@@ -80,7 +80,7 @@ def test_global(cwd):
def test_global(cwd):
- if sys.platform != "linux":
+ if not (sys.platform.startswith("linux") | sys.platform.startswith("freebsd")):
pytest.skip()
os.environ["XDG_CONFIG_HOME"] = cwd.as_posix()
config = PyToolConfig("bogus", cwd, NestedModel, global_config=True)

View File

@ -0,0 +1,3 @@
The goal of this project is to manage configuration for python tools,
such as black and rope and add support for a pyproject.toml
configuration file.