Blame python-poetry-dynamic-versioning.spec

ea6e13f
# tests require network to use poetry
ea6e13f
%bcond_with tests
4620a37
4620a37
%global _description %{expand:
ea6e13f
This is a Python 3.7+ plugin for Poetry 1.2.0+ and Poetry Core 1.0.0+ to enable
ea6e13f
dynamic versioning based on tags in your version control system, powered by
ea6e13f
Dunamai. Many different version control systems are supported, including Git
ea6e13f
and Mercurial; please refer to the Dunamai page for the full list (and minimum
ea6e13f
supported version where applicable).
ea6e13f
ea6e13f
poetry-dynamic-versioning provides a build backend that patches Poetry Core to
ea6e13f
enable the versioning system in PEP 517 build frontends. When installed with
ea6e13f
the plugin feature (i.e., poetry-dynamic-versioning[plugin]), it also
ea6e13f
integrates with the Poetry CLI to trigger the versioning in commands like
ea6e13f
poetry build.}
4620a37
4620a37
Name:           python-poetry-dynamic-versioning
91fce26
Version:        0.21.3
4620a37
Release:        %{autorelease}
4620a37
Summary:        Plugin for Poetry to enable dynamic versioning based on VCS tags
4620a37
b9033f3
# SPDX
4620a37
License:        MIT
ea6e13f
URL:            https://github.com/mtkennerly/poetry-dynamic-versioning
ea6e13f
Source:         %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
4620a37
4620a37
BuildArch:      noarch
4620a37
4620a37
%description %_description
4620a37
4620a37
%package -n python3-poetry-dynamic-versioning
4620a37
Summary:        %{summary}
4620a37
BuildRequires:  python3-devel
ea6e13f
%if %{with tests}
ea6e13f
BuildRequires:  python3-pytest
ea6e13f
BuildRequires:  /usr/bin/git
ea6e13f
BuildRequires:  /usr/bin/hg
ea6e13f
BuildRequires:  /usr/bin/darcs
ea6e13f
BuildRequires:  /usr/bin/svn
ea6e13f
BuildRequires:  /usr/bin/bzr
ea6e13f
BuildRequires:  /usr/bin/fossil
ea6e13f
BuildRequires:  /usr/bin/poetry
ea6e13f
# pijul is not in Fedora yet
ea6e13f
#BuildRequires:  /usr/bin/pijul
ea6e13f
%endif
4620a37
4620a37
%description -n python3-poetry-dynamic-versioning %_description
4620a37
4620a37
%prep
ea6e13f
%autosetup -n poetry-dynamic-versioning-%{version}
4620a37
4620a37
%generate_buildrequires
4620a37
%pyproject_buildrequires
4620a37
4620a37
%build
4620a37
%pyproject_wheel
4620a37
4620a37
%install
4620a37
%pyproject_install
ea6e13f
%pyproject_save_files poetry_dynamic_versioning
4620a37
4620a37
%check
4620a37
%if %{with tests}
ea6e13f
# set up git
ea6e13f
git config --global user.email "you@example.com"
ea6e13f
git config --global user.name "Your Name"
ea6e13f
# set up bzr
ea6e13f
brz whoami "Your Name <name@example.com>"
ea6e13f
# set up darcs
ea6e13f
export DARCS_EMAIL="Yep something <name@example.com>"
ea6e13f
4620a37
%{pytest}
4620a37
%endif
4620a37
4620a37
%files -n python3-poetry-dynamic-versioning -f %{pyproject_files}
ea6e13f
%doc README.md CHANGELOG.md README.plugin.md
ea6e13f
%{_bindir}/poetry-dynamic-versioning
ea6e13f
%license LICENSE
4620a37
4620a37
%changelog
4620a37
%autochangelog