mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
d7333a66fc
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.
31 lines
875 B
Makefile
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>
|