Blame python-hatch-vcs.spec

81daa57
# Let’s try to build this as early as we can, since it’s a dependency for
24a9b49
# some important libraries, such as python-platformdirs.
81daa57
%bcond_with bootstrap
81daa57
%if %{without bootstrap}
81daa57
%bcond_without tests
81daa57
%else
81daa57
%bcond_with tests
81daa57
%endif
81daa57
81daa57
Name:           python-hatch-vcs
24a9b49
Version:        0.3.0
81daa57
Release:        %autorelease
81daa57
Summary:        Hatch plugin for versioning with your preferred VCS
81daa57
0786238
# SPDX
81daa57
License:        MIT
81daa57
URL:            https://github.com/ofek/hatch-vcs
a47c8ad
Source:         %{pypi_source hatch_vcs}
81daa57
81daa57
BuildArch:      noarch
81daa57
9cf64cb
# Work with setuptools_scm 7.1 (fix #25)
9cf64cb
# https://github.com/ofek/hatch-vcs/pull/26
9cf64cb
Patch:          %{url}/pull/26.patch
9cf64cb
81daa57
BuildRequires:  python3-devel
81daa57
81daa57
%if %{with tests}
81daa57
BuildRequires:  python3dist(pytest)
81daa57
BuildRequires:  git-core
81daa57
%endif
81daa57
937958f
%global common_description %{expand:
81daa57
This provides a plugin for Hatch that uses your preferred version control
81daa57
system (like Git) to determine project versions.}
81daa57
937958f
%description %{common_description}
81daa57
81daa57
81daa57
%package -n python3-hatch-vcs
81daa57
Summary:        %{summary}
81daa57
937958f
%description -n python3-hatch-vcs %{common_description}
81daa57
81daa57
81daa57
%prep
9cf64cb
%autosetup -n hatch_vcs-%{version} -p1
81daa57
81daa57
81daa57
%generate_buildrequires
4f851ea
%pyproject_buildrequires
81daa57
81daa57
81daa57
%build
81daa57
%pyproject_wheel
81daa57
81daa57
81daa57
%install
81daa57
%pyproject_install
81daa57
%pyproject_save_files hatch_vcs
81daa57
81daa57
81daa57
%check
81daa57
%if %{with tests}
81daa57
%pytest
81daa57
%else
81daa57
%pyproject_check_import
81daa57
%endif
81daa57
81daa57
81daa57
%files -n python3-hatch-vcs -f %{pyproject_files}
81daa57
%doc HISTORY.md
81daa57
%doc README.md
81daa57
81daa57
81daa57
%changelog
81daa57
%autochangelog