diff --git a/devel/py-confuse/Makefile b/devel/py-confuse/Makefile index c8934756b913..3d69e42c2028 100644 --- a/devel/py-confuse/Makefile +++ b/devel/py-confuse/Makefile @@ -1,23 +1,22 @@ PORTNAME= confuse -DISTVERSION= 2.0.1 -PORTREVISION= 1 +PORTVERSION= 2.1.0 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -MAINTAINER= ports@FreeBSD.org -COMMENT= Configuration library for Python that uses YAML +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Painless YAML config files WWW= https://github.com/beetbox/confuse LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE -BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=2<4:devel/py-flit-core@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}poetry-core>=0:devel/py-poetry-core@${PY_FLAVOR} RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} -TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flake8>=3.6:devel/py-flake8@${PY_FLAVOR} \ USES= python -USE_PYTHON= autoplist pep517 +USE_PYTHON= autoplist concurrent pep517 NO_ARCH= yes .include diff --git a/devel/py-confuse/distinfo b/devel/py-confuse/distinfo index 08dcd53d35af..39e0d6662bd4 100644 --- a/devel/py-confuse/distinfo +++ b/devel/py-confuse/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1685041034 -SHA256 (confuse-2.0.1.tar.gz) = 7379a2ad49aaa862b79600cc070260c1b7974d349f4fa5e01f9afa6c4dd0611f -SIZE (confuse-2.0.1.tar.gz) = 50872 +TIMESTAMP = 1762586786 +SHA256 (confuse-2.1.0.tar.gz) = abb9674a99c7a6efaef84e2fc84403ecd2dd304503073ff76ea18ed4176e218d +SIZE (confuse-2.1.0.tar.gz) = 22748 diff --git a/devel/py-confuse/pkg-descr b/devel/py-confuse/pkg-descr index d59fe64ad9c9..7324cec7bc6d 100644 --- a/devel/py-confuse/pkg-descr +++ b/devel/py-confuse/pkg-descr @@ -1,7 +1,26 @@ -Confuse is a configuration library for Python that uses YAML. +Confuse is a configuration library for Python that uses YAML. It takes care of +defaults, overrides, type checking, command-line integration, environment +variable support, human-readable errors, and standard OS-specific locations. -It takes care of defaults, overrides, type checking, command-line -integration, human-readable errors, and standard OS-specific locations. - -Confuse was made to power beets. Like beets, it is available under the MIT -license. +Here is what Confuse brings to the table: +- An utterly sensible API resembling dictionary-and-list structures but + providing transparent validation without lots of boilerplate code. Type + config['num_goats'].get(int) to get the configured number of goats and ensure + that it is an integer. +- Combine configuration data from multiple sources. Using layering, Confuse + allows user-specific configuration to seamlessly override system-wide + configuration, which in turn overrides built-in defaults. An in-package + config_default.yaml can be used to provide bottom-layer defaults using the + same syntax that users will see. A runtime overlay allows the program to + programmatically override and add configuration values. +- Look for configuration files in platform-specific paths. Like $XDG_CONFIG_HOME + or ~/.config on Unix; "Application Support" on macOS; %APPDATA% on Windows. + Your program gets its own directory, which you can use to store additional + data. You can transparently create this directory on demand if, for example, + you need to initialize the configuration file on first run. And an environment + variable can be used to override the directory's location. +- Integration with command-line arguments via argparse or optparse from the + standard library. Use argparse's declarative API to allow command-line options + to override configured defaults. +- Include configuration values from environment variables. Values undergo + automatic type conversion, and nested dicts and lists are supported.