Files
sthen d7333a66fc import ports/devel/py-poetry-dynamic-versioning, feedback/ok tb@
This is a plugin for Poetry to enable dynamic versioning based on tags
in your version control system, powered by Dunamai. Many different
version control systems are supported, including Git and Mercurial;
please refer to Dunamai for the full list.

Once the plugin is set up, you can create tags in your version control
system (e.g., git tag v0.1.0 -m "New release"), and the plugin
will automatically insert that version into relevant files (like
pyproject.toml or *.py files with a __version__ line) for the duration
of Poetry commands such as poetry build, then revert the changes
afterwards to keep your repository clean. The plugin aims to inject a
static copy of the version into build artifacts (sdists/wheels) without
the need to manually edit and commit changed files in your repository.
2026-02-06 13:52:04 +00:00

31 lines
875 B
Makefile

COMMENT= let Poetry fetch versions from VCS tags
MODPY_DISTV= 1.9.1
DISTNAME= poetry_dynamic_versioning-${MODPY_DISTV}
PKGNAME= py-poetry-dynamic-versioning-${MODPY_DISTV}
CATEGORIES= devel
HOMEPAGE= https://github.com/mtkennerly/poetry-dynamic-versioning/
# MIT
PERMIT_PACKAGE= Yes
MODULES= lang/python
MODPY_PI= Yes
MODPY_PYBUILD= poetry-core
RUN_DEPENDS= devel/py-dunamai \
devel/py-poetry-core \
textproc/py-tomlkit \
www/py-jinja2
# - some tests and some runtime usage wants poetry (not poetry-core), not ported
# - disable test__get_version tests which require running from a git checkout
# - some test__enable_in_doc__project tests fail, look like the expected output
# may need changing?
MODPY_PYTEST_ARGS= -vv --ignore tests/test_integration.py \
-k 'not test__get_version__defaults \
and not test__get_version__format_jinja'
.include <bsd.port.mk>