2019-09-03 16:16:57 +00:00
|
|
|
%global pypi_name clikit
|
|
|
|
Name: python-%{pypi_name}
|
|
|
|
Version: 0.3.1
|
|
|
|
Release: 1%{?dist}
|
|
|
|
Summary: Builds beautiful and testable command line interfaces
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/sdispater/clikit
|
|
|
|
Source0: %{pypi_source}
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
2020-10-26 15:11:32 +00:00
|
|
|
BuildRequires: python3-devel
|
2019-09-03 16:16:57 +00:00
|
|
|
|
|
|
|
%description
|
2024-09-05 15:40:10 +00:00
|
|
|
Tests building with the poetry(-core) build backend.
|
2019-09-03 16:16:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
%description -n python3-%{pypi_name}
|
|
|
|
%{summary}.
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
2024-09-05 15:40:10 +00:00
|
|
|
%if 0%{?rhel}
|
|
|
|
# force the poetry-core build backend, as that is available rather than full poetry
|
|
|
|
sed -i 's/"poetry>=0.12"/"poetry-core"/' pyproject.toml
|
|
|
|
sed -i 's/"poetry.masonry.api"/"poetry.core.masonry.api"/' pyproject.toml
|
|
|
|
%endif
|
2019-09-03 16:16:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
2022-01-14 15:26:40 +00:00
|
|
|
# this runtime-requires pastel<0.2 which is no longer available in Fedora
|
|
|
|
%pyproject_buildrequires -R
|
2019-09-03 16:16:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
2021-05-27 12:59:56 +00:00
|
|
|
# Internal check that $TMPDIR is not changed
|
|
|
|
TPMDIR_original="$TMPDIR"
|
|
|
|
|
2019-09-03 16:16:57 +00:00
|
|
|
%pyproject_install
|
|
|
|
|
2021-05-27 12:59:56 +00:00
|
|
|
# Internal check that $TMPDIR is not changed
|
|
|
|
test "$TMPDIR" == "$TPMDIR_original"
|
|
|
|
|
|
|
|
|
2020-09-29 11:14:46 +00:00
|
|
|
%check
|
|
|
|
# Internal check that the RECORD and REQUESTED files are
|
|
|
|
# always removed in %%pyproject_wheel
|
2020-09-30 12:36:07 +00:00
|
|
|
test ! $(find %{buildroot}%{python3_sitelib}/ | grep -E "\.dist-info/RECORD$")
|
|
|
|
test ! $(find %{buildroot}%{python3_sitelib}/ | grep -E "\.dist-info/REQUESTED$")
|
2019-09-03 16:16:57 +00:00
|
|
|
|
2020-09-29 11:14:46 +00:00
|
|
|
|
|
|
|
%files -n python3-%{pypi_name}
|
2019-09-03 16:16:57 +00:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2020-09-29 11:14:46 +00:00
|
|
|
%{python3_sitelib}/%{pypi_name}/
|
|
|
|
%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/
|